Question: Consider the agesexresponse example in Section 10.1.3. This dataset is available from the texts web site in the Datasets area. a. Duplicate the analyses done
Consider the age–sex–response example in Section 10.1.3. This dataset is available from the text’s web site in the Datasets area.
a. Duplicate the analyses done in Section 10.1.3.
b. For the model containing both age and sex, test H0 : logit response is linear in age versus Ha : logit response is quadratic in age. Use the best test statistic.
c. Using a Wald test, test H0 : no age × sex interaction. Interpret all parameters in the model.
d. Plot the estimated logit response as a function of age and sex, with and without fitting an interaction term.
e. Perform a likelihood ratio test of H0 : the model containing only age and sex is adequate versus Ha : model is inadequate. Here, “inadequate”
may mean nonlinearity (quadratic) in age or presence of an interaction.
f. Assuming no interaction is present, test H0 : model is linear in age versus Ha : model is nonlinear in age. Allow “nonlinear” to be more general than quadratic. (Hint: use a restricted cubic spline function with knots at age=39, 45, 55, 64 years.)
g. Plot age against the estimated spline transformation of age (the transformation that would make age fit linearly). You can set the sex and intercept terms to anything you choose. Also plot Prob{response = 1 |
age, sex} from this fitted restricted cubic spline logistic model.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
