linear regression on Casual Inference
https://www.casualinf.com/tags/linear-regression/
Recent content in linear regression on Casual InferenceHugo -- gohugo.ioyouremail@domain.com (John Lee)youremail@domain.com (John Lee)Thu, 07 Jan 2021 00:00:00 +0000Linear Regression on Coffee Rating Data
https://www.casualinf.com/post/2021-01-07-linear-regression-on-coffee-rating-data/
Thu, 07 Jan 2021 00:00:00 +0000youremail@domain.com (John Lee)https://www.casualinf.com/post/2021-01-07-linear-regression-on-coffee-rating-data/While I am reading Elements of Statistical Learning, I figured it would be a good idea to try to use the machine learning methods introduced in the book. I just finished a chapter on linear regression, and learned more about linear regression and the penalized methods (Ridge and Lasso). Since there is an abundant resource available online, it would be redundant to get into the details. I’ll quickly go over Ordinary Least Squares, Ridge, and Lasso regression, and quickly show an application of those methods in R.My First Post
https://www.casualinf.com/post/first-post/
Sun, 17 Jun 2018 00:00:00 +0000youremail@domain.com (John Lee)https://www.casualinf.com/post/first-post/This is the first blog post of my life! I will be using this blog to post about anything that I want to share in statistics. For starter, I will run a linear regression with the iris dataset.
names(iris) ## [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species" Let’s predict Sepal.Length with Petal.Length and Petal.Width.
#separate into training and testing sets set.seed(1234) train_ind <- sample(nrow(iris), floor(0.8 * nrow(iris))) iris_train <- iris[train_ind,] iris_test <- iris[-train_ind,] #run linear regression iris_lm <- lm(Sepal.