Comparison of Repeated Measures and Covariance Analysis for Pretest-Posttest Data -By Chunmei Zhou Introduction We develop a comparison of repeated measures and covariance analysis for pretest-posttest data. We consider a study design for which subjects are randomized to a drug or placebo group and measured for systolic blood pressure before and after receiving the treatment. To develop models to assess the effect of treatment on SBP, we first consider baseline blood pressure as a covariate. As an alternative, the baseline and final blood pressure can be considered to be repeated measures. Data Description We simulate data for a pretest-posttest study for comparison of covariance analysis and repeated measures. We assume the response variable to be normally distributed, the sample size is 30, the average response for baseline is 175 and the treatment effect is –5. data sbp; %let basemean=175; *overall average response for baseline; %let nsub=30; *Number of subjects; %let err_v=100; *Residual error variance at a time point; %let tsubv=100; *Treatment by subject variance; %let subv=200; *Variance of the subject effects; %let nrep=1000; *Number of replications of the simulation; %let effp1=0; *Placebo effect; %let effp2=-5; *Treatment effect; do trial=1 to &nrep; do subj=1 to &nsub; m=&basemean; sub=sqrt(&subv)*rannor(3345); do time=1 to 2; v=sqrt(&err_v)*rannor(3345); if subj<=&nsub/2 then do; trt=1; if time=1 then y=m+sub+v; if time=2 then y=m+sub+&effp1+v; end; if subj>&nsub/2 then do; trt=2; if time=1 then y=m+sub+v; if time=2 then y=m+sub+&effp2+v+sqrt(&tsubv)*rannor(3345); end; output; end; end; Covariance Model Fitting We use placebo as reference group to fit the covariance model using the following statement: proc mixed data=a; by trial; class subj tref; model sbp2=sbp1 tref/s; make 'solutionf' out=est1; run; Covariance Model Fitting Covariance Parameter Estimates Cov Parm Estimate Residual 207.11 Solution for Fixed Effects Effect Intercept sbp1 tref tref tref 0 1 Estimate 66.6827 0.6280 -5.9770 0 Standard Error 31.0513 0.1834 5.3231 . DF 27 27 27 . t Value 2.15 3.42 -1.12 . Pr > |t| 0.0409 0.0020 0.2714 . Repeated-Measures Model Fitting we fit repeated measures model using placebo and pretest as reference groups. We also create a group variable to have value of 1 for placebo group at post test, 2 for treatment group at post test, and 3 for pretest. proc mixed data=b; by trial; class subj tref timref grp; model y=tref timref tref*timref/s; repeated /group=grp; random subj; make 'solutionf' out=est2; run; Repeated-Measures Model Fitting Covariance Parameter Estimates Cov Parm subj Residual Residual Residual Group grp 1 grp 2 grp 3 Estimate 170.26 72.3522 259.29 49.7515 Repeated-Measures Model Fitting Solution for Fixed Effects Effect Intercept tref tref timref timref tref*timref tref*timref tref*timref tref*timref tref timref 0 1 0 0 1 1 0 1 0 1 0 1 Estimate 168.13 4.6322 0 4.1336 0 -7.7003 0 0 0 Standard Error 3.8298 5.4162 . 2.8531 . 5.3612 . . . DF t Value Pr >|t| 28 43.90 <.0001 28 0.86 0.3997 . . . 28 1.45 0.1585 . . . 28 -1.44 0.1620 . . . . . . . . . Comparison of Two Approaches To compare the two approaches, we set different parameters for three variances (subject variance, residual error variance and treatment by subject variance) to generate data, and then run the simulation 1000 times and get estimates of treatment effect each time from each methods. However, we could not get model fitting results for the total 1000 simulations from repeated-measures model because of infinite likelihood or convergence failure for some trials. Table1. Comparison of Estimates for treatment effect from two models with 1000 trials with sample size 30, treatment effect –5 and different variance compontents Method Covariance Sub. var. Res. Var. Trt.*Sub. Var. No. of Trials Mean of Est. of trt effect Std. Dev. of Estimate 200 100 1000 1000 -4.66 9.20 877 -4.66 9.27 1000 -4.97 5.30 911 -4.99 5.70 1000 -4.94 4.14 962 -4.92 4.39 1000 -4.95 5.07 962 -4.98 5.69 1000 -5.00 6.74 965 -5.05 7.65 1000 -5.06 9.21 970 -5.13 10.51 Repeat measures Covariance 200 100 100 Repeat measures Covariance 100 50 100 Repeat measures Covariance 100 100 100 Repeat measures Covariance 200 200 100 Repeat measures Covariance Repeat measures 400 400 100 Covariance Model Covariance Model Repeated-Measures 15 10 Repeated Measures 25 20 15 5 0 -5 10 5 0 -5 -10 -10 -15 -15 -20 -20 -25 -25 -30 -30 -35 -35 -40 Figure1. Box Plots of Estimates for treatment effect from two models with 1000 trials with treatment effect –5, subject variance 200, residual error variance 200 and treatment by subject variance 100 Figure2. Box Plots of Estimates for treatment effect from two models with 1000 trials with treatment effect –5, subject variance 400, residual error var 400 and treatment by subject variance 100 Discussion The repeated-measures analysis of variance and analysis of covariance are two common approaches for analysis of pretest-posttest data. They are closely related but assumptions for the analysis and variance estimates for the parameters are differ. Our analysis results suggest the covariance analysis method may improve the precision of the estimates of the treatment effects compared to repeated measures analysis. But we should know the assumption that there is a linear relationship between pre- and post-treatment values may not be true. If this were the case, fitting a baseline covariate could lead to less precise results.