2) Select the dependent variable you are interested in, along with independent variables which you believe are causing the dependent variable
The dependent variable for this model is the percentage of students
classified as at risk (DPETRSKP). The independent variables
are the percentage of economically disadvantaged students
(DPETECOP), the percentage of emergent bilingual/English
learner students (DPETLEPP), the percentage of special
education students (DPETSPEP), and total district
enrollment (DPETALLC). I selected these variables because
they represent different student population characteristics and district
size that may be related to the percentage of students classified as at
risk.
3) Create a linear model using the “lm()” command, save it to some object
4) Call a “summary()” on your new model
Call:
lm(formula = DPETRSKP ~ DPETECOP + DPETLEPP + DPETSPEP + DPETALLC,
data = districts)
Residuals:
Min 1Q Median 3Q Max
-41.294 -6.432 -0.065 6.209 77.657
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.189e+00 1.562e+00 3.963 7.85e-05 ***
DPETECOP 3.503e-01 2.035e-02 17.214 < 2e-16 ***
DPETLEPP 5.570e-01 3.060e-02 18.202 < 2e-16 ***
DPETSPEP 6.803e-01 7.247e-02 9.387 < 2e-16 ***
DPETALLC 5.799e-05 3.200e-05 1.812 0.0703 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 13.22 on 1203 degrees of freedom
Multiple R-squared: 0.5218, Adjusted R-squared: 0.5203
F-statistic: 328.2 on 4 and 1203 DF, p-value: < 2.2e-16
5) interpret the model’s r-squared and p-values. How much of the dependent variable does the overall model explain? What are the significant variables? What are the insignificant variables?
The model has an R-squared of 0.5218, so it explains
about 52.2% of the variation in at-risk student
percentages. The overall model is statistically significant.
DPETECOP, DPETLEPP, and DPETSPEP
are significant, while DPETALLC is not significant at the
0.05 level.
6) Choose some significant independent variables. Interpret its Estimates (or Beta Coefficients). How do the independent variables individually affect the dependent variable?
The significant independent variables all have positive relationships with the percentage of at-risk students. Holding the other variables constant, a one percentage-point increase in economically disadvantaged students is associated with an estimated 0.35 percentage-point increase** in at-risk students. A one percentage-point increase in emergent bilingual/English learner students is associated with an estimated 0.56 percentage-point increase in at-risk students. Finally, a one percentage-point increase in special education students is associated with an estimated 0.68 percentage-point increase in at-risk students.
Of the significant variables, special education has the largest estimated coefficient, followed by emergent bilingual/English learner status and economic disadvantage. These results suggest that each of these student population characteristics is positively associated with the percentage of students classified as at risk when the other variables in the model are held constant.
7) Does the model you create meet or violate the assumption of linearity? Show your work with “plot(x,which=1)”
The model appears to generally meet the assumption of linearity. The residuals are scattered around zero and the red trend line stays fairly close to zero across most fitted values. There is a slight downward curve at the higher fitted values, but it does not appear strong enough to indicate a major violation of linearity.