Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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-testStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started