14.4 a. Fit the random intercepts and slopes model to the stroke recovery data in WinBUGS. Create...
Question:
14.4
a. Fit the random intercepts and slopes model to the stroke recovery data in WinBUGS. Create a scatter plot of the estimated mean random slopes against the random intercepts. Calculate the Pearson correlation between the intercepts and slopes.
b. Model the random slopes and intercepts so that each subject’s intercept is correlated with his or her slope (using a multivariate Normal distribution). Find the mean and 95% posterior interval for the correlation between the intercept and slope. Interpret the correlation and give reasons for the somewhat surprising value.
Hint: To start the MCMC sampling, it may be necessary to use initial values based on the means of the random intercepts and slopes model from part (a).
Step by Step Answer:
An Introduction To Generalized Linear Models
ISBN: 9781138741515
4th Edition
Authors: Annette J. Dobson, Adrian G. Barnett