Section 10.7 Conducting Simple Linear Regression Analysis
Weβll now proceed to calculate the slope and intercept using the Ordinary Least Squares (OLS) method. OLS is employed to minimize the sum of squared differences between the observed and predicted values of the dependent variable by minimizing the overall distance between the data points and the regression line. The y-intercept represents the value of risky lifestyle when low self-control is zero. Meanwhile, the slope denotes the change in risky lifestyle for every one-unit change in low self-control.
rl_by_lsc <- lm(formula = RL ~ LSC, data = Inmate_Survey, na.action = na.exclude)
summary(object = rl_by_lsc)
The linear regression model
rl_by_lsc predicts the dependent variable RL (risky lifestyle) based on the independent variable LSC (low self-control) using the lm() function in R. The na.action = na.exclude argument ensures that observations with missing values are included in the analysis rather than being removed. Based on the results, we can write down the regression equation for our model:
\begin{equation*}
\text{Risky lifestyles} = -0.34 + 0.09 \times \text{low self-control}
\end{equation*}
This means that if low self-control increases by one unit in an inmate, risky lifestyles would typically change by 0.09227.
Subsection 10.7.1 NHST Steps for Simple Linear Regression Model
We may want to make inferences about the population (all inmates within the 20 prisons in South Korea where the current sample was drawn from) using the data we have. That is when we conduct Null Hypothesis Significance Testing (NHST), which was covered previously. Specifically, we may want to assess the statistical significance of the slope in simple linear regression. If the slope (i.e., the unstandardized coefficient of low self-control or the rate of change in risky lifestyle for a one-unit change in low self-control) is not equal to zero, it implies that there is a statistically significant relationship between low self-control and risky lifestyles.
Subsubsection 10.7.1.1 Step 1: Formulate the Null and Alternative Hypotheses
-
\(H_0\text{:}\) The unstandardized coefficient of low self-control is equal to zero.
-
\(H_A\text{:}\) The unstandardized coefficient of low self-control is not equal to zero.
Subsubsection 10.7.1.2 Step 2: Calculate the Test Statistic
The test statistic for the significance of the unstandardized coefficient in OLS regression is the t-statistic we used previously (aka the Wald test).
rl_by_lsc <- lm(formula = RL ~ LSC, data = Inmate_Survey, na.action = na.exclude)
summary(object = rl_by_lsc)
The results indicate that the unstandardized coefficient of low self-control is 0.09, and the t-value is 6.023.
Subsubsection 10.7.1.3 Step 3: Determine the Probability (P-Value) of Obtaining a Test Statistic at Least as Extreme as the Observed Value, Assuming no Relationship Exists
The p-value for the unstandardized coefficient of low self-control (0.09) is \(< 2.45 \times 10^{-9}\text{,}\) which is much smaller than 0.05.
Subsubsection 10.7.1.4 Steps 4 & 5: If the P-Value is Very Small, Typically Less Than 5%, Reject the Null Hypothesis, but if the P-Value is Not Small, Typically 5% or Greater, Retain the Null Hypothesis
The p-value of \(< 0.05\) in our simple linear regression model suggests that there is a very slim probability that the t-statistic for the unstandardized coefficient of low self-control would be as large as observed if the null hypothesis were true. In short, the null hypothesis was rejected in favor of our alternative hypothesis that the unstandardized coefficient of low self-control is not equal to zero.
Subsection 10.7.2 Reporting the Results From the Simple Linear Regression Model
We found that low self-control reported by inmates is a statistically significant predictor of risky lifestyles (\(b = 0.09\text{;}\) \(p < .05\)) within our sample. Specifically, for every one-unit increase in low self-control among inmates, the predicted increase in risky lifestyle is 0.09 units.
