Stat209/Ed260 D Rogosa
2/20/09
Solutions Assignment 5.
The many uses and forms of analysis of covariance
Problem 1
The prediction equation to work from is
S = 1900 + 230*B + 18*A + 100*E + 490*D + 190*Y + 50*T  2400*X
The coefficient of T in the regression equation is 50.
Note that
salary is in an arbitrary 'funnymoney' unit. It tells us that
there will be a 50 unit decrease in salary for someone whose student
evaluations change from very good (T=1) to poor (T=0).
This is true no
matter what the values of the other variables are (of course this conclusion
applies only to this model, with its set of predictors).
partial regression coefficient of T here could be interpreted as the
average change in salary between the two levels of student evaluation,
which is 50.

To do this problem the HARD way, you can plug in the values of the other
variables that the question provides for us (B=A=E=D=X=1 and Y=5) into
the regression equation:
S = 1900 + 230(1) + 18(1) + 100(1) + 490(1) + 190(5) + 50(T)  2400(1)
= 1288 + 50(T)
For a professor with good student evaluations (T = 1): S = 1288 + 50(1) = 1338
For a professor with bad student evaluations (T = 0): S = 1288
So the expected change in salary is 12881338 = 50.
(That is, a
decrease of 50).

Part b.
model for the S on X regression is
E(SX) = beta(0) + beta(1)*X
To calculate the value of the estimate of the slope (beta(hat)(1)),
first look at the expected values of X within each group and realize
that they are equal to the means of S within each group.
sample value of
E(SX=0) =
beta(hat)(0) = mu(hat)(0)
E(SX=1) =
beta(hat)(0) + beta(hat)(1) = mu(hat)(1)
Where:
mu(hat)(0) = the mean salary for males = 16,100
mu(hat)(1) = the mean salary for females = 11,200
To calculate the slope, beta(hat)(1), we subtract the two group
means:
beta(hat)(1) = mu(hat)(1)  mu(hat)(0) = 11,200  16,100 = 4900
Another way to do this problem is to realize that the line for the
regression of S on X will pass through the points (0, 16100) and
(1, 11200).
The slope = (change in S)/(change in X) = (16100 11200)/(0  1) = 4900.

Problem 2
Page 1 of 8
06/12/2010
http://wwwstat.stanford.edu/~rag/stat209/09hw5.sol
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Documentcarry out standard ancova
> incent
= read.table(file="D:\\drr06\\stat209\\retention.dat", header = T)
> attach(incent)
> summary(incent)
Retent
StudyMin
Incent
Min.
: 3.000
Min.
: 5.00
Min.
:0.0
1st Qu.: 5.750
1st Qu.: 8.75
1st Qu.:0.0
Median : 8.000
Median :12.50
Median :0.5
Mean
: 7.875
Mean
:12.50
Mean
:0.5
3rd Qu.:10.000
3rd Qu.:16.25
3rd Qu.:1.0
Max.
:13.000
Max.
:20.00
Max.
:1.0
> anc = lm(Retent ~ Incent + StudyMin)
> summary(anc)
Call:
lm(formula = Retent ~ Incent + StudyMin)
Residuals:
Min
1Q
Median
3Q
Max
2.5083 0.7833 0.1000
0.8792
1.6750
Coefficients:
Estimate Std. Error t value Pr(>t)
(Intercept)
2.87500
0.65165
4.412 0.000243 ***
Incent
4.08333
0.49260
8.289 4.64e08 ***
StudyMin
This is the end of the preview.
Sign up
to
access the rest of the document.
 Winter '09
 Rogosa,D
 Covariance, Normal Distribution, Regression Analysis, Variance, Errors and residuals in statistics, Residual standard error, Estimate Std

Click to edit the document details