Using Linear Mixed Models to Fit a Random Coefficients Model
A physician is evaluating a new diet for her patients with a family history of heart disease. To test the effectiveness of this diet, 16 patients are placed on the diet for 6 months. Their weights and triglyceride levels are measured before and after the study, and the physician wants to know if the weights have changed.
This example uses the file dietstudy.sav. See the topic Sample Files for more information. The results were previously analyzed by treating time as a repeated effects factor. See the topic Using Linear Mixed Models to Analyze Repeated Measurements for more information.
The physician believes there may be a linear relationship between time on the diet and patient weight; thus, an alternative to fitting the repeated measures model is to treat time as a covariate and fit a random coefficients model. The random coefficients model has a fixed component and and random component:
- The fixed component consists of an intercept, which is related to patient starting weight, and a term for the time covariate, which shows the change in weight per time period.
- The random component also consists of an intercept and term for the time covariate, with patients defined as the subjects.
You are, in essence, fitting a linear regression to each patient in which the regression coefficients are random effects; hence it is a "random coefficients" model.
Because the data file was originally set up for analysis in the GLM Repeated Measures procedure, you need to restructure the file from variables to cases.