910 likes | 1.05k Views
Simple and Multiple Regression. 2.1 Simple Linear Regression. Let's examine the relationship between the size of school and academic performance to see if the size of the school is related to academic performance.
E N D
2.1 Simple Linear Regression • Let's examine the relationship between the size of school and academic performance to see if the size of the school is related to academic performance. • For this example, api00 is the dependent variable and enroll is the predictor.
Dependent variable • api00/academic performance of the school • Independent variable • Enroll/number of students
F-test: • 44.83 which means that the model is statistically significant. • R-squared • approximately 10% of the variance of api00 is accounted for by the model, in this case, enroll. • T-test • for enroll equals -6.70, and is statistically significant, meaning that the regression coefficient for enroll is significantly different from zero. • Coefficient • for enroll is -.1998674, or approximately -.2, meaning that for a one unit increase in enroll, we would expect a .2-unit decrease in api00.
Predicted Value • After you run a regression, you can create a variable that contains the predicted values using the predict command. • For this example, our new variable name will be fv
Below we can show a scatterplot of the outcome variable, api00 and the predictor, enroll.
We can combine scatter with lfit to show a scatterplot with fitted values.
If you use the mlabel (snum) option on the scatter command, you can see the school number for each point. This allows us to see, for example, that one of the outliers is school 2910.
2. 2 Multiple Regression • Dependent variable • api00/academic performance of the school • Independent variable • ell/english language learners • meals/pct free meals • yr_rnd/year round school • mobility/pct 1st year in school
Independent variable • acs_k3/avg class size k-3 • acs_46/avg class size 4-6 • full/pct full credential • emer/pct emer credential • enroll/number of students
F statistics • R-square, Adjusted R-square • T values • Coefficients
But how to compare the relative importance of coefficients? • Regress with beta command
Let us compare the regress output with the listcoef output. You will notice that the values listed in the Coef., t, and P>|t| values are the same in the two outputs. • The bStdX column gives the unit change in Y expected with a one standard deviation change in X. • The bStdY column gives the standard deviation change in Y expected with a one unit change in X. • The SDofX column gives that standard deviation of each predictor variable in the model.
2. 3 Hypothesis Testing • Single coefficient • Mutiple coefficients