Question: Code in R. library (multcomp) 1. Model read in terms of female, schtyp and ses (as a factor); o = lm(read female + schtyp +

Code in R.

Code in R. library (multcomp) 1. Model read in terms of female,

library (multcomp) 1. Model read in terms of female, schtyp and ses (as a factor); o = lm(read female + schtyp + factor(ses)). 2. Show the first few rows of the design matrix. 3. Calculate (XT X)-ly where Y is the reading score and X is the design matrix. 4. Compare the value computed in the previous step to the coefficients from the lm. Are they the same? 5. Use the "waldtest function of the library lmtest to test the null hypothesis that the factor ses explains no variation in reading scores. 6. Repeate the last step manually using syntax like t(coef(o)[4:5]) %*% solve(vcov(o))[4:5] %*% coef(o)[4:5] to create the test statistic and using an F-test

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!