Day 4: Introduction to Regression Analysis in R
In this lecture, we will learn how to use the lm() function to conduct regression analysis in R. To report the regression result with a table, we will use the modelsummary() function of the modelsummary package.
Learning Objectives
- to be able to use the
lm()function to conduct regression analysis in R. - to be able to create a summary table of regression results with the
modelsummary()function. - to be able to create a summary table of descriptive statistics with the
datasummary()function.
Preparation
- This is the official website for the
modelsummarypackage. Let’s take a look at the website and see what kind of tables you can create with themodelsummarypackage.
Lecture Slides
Click here for Lecture 4’s slides.
Exercise problems
Quick view of the lecture slides:
Supplementary Materials
- Exercise Problems
- Solutions for the Exercise Problems
- For the estimation of fixed-effects model, you can use the
fixestpackage.