Dear Statalisters,
I am trying to implement a mixed-effet repeated measures model that was described by Hamlett, Ryan, Serrano-Trespalacios & Wolfinger in their paper entitled "" (Journal of Air and Waste Management Association, 2003. 53:4 442-50). The paper appears to be freely accessible from the publisher.
The model is described mathematically, where repeated measures are taken on individuals using two different, correlated, measurements. They then give a worked example of implementing the model in SAS. From reading the article, I know there should be a random-effect for the measurement type with an unstructured covariance matrix, and then residual errors of each replicate to be nested within each individual. I can't seem to wrap my head around the appropriate syntax for -mixed-.
I've provided a data example below. My best guess at the syntax would be:
These data are for the linked data example and are attributable to Bland and Altman.
Any help is much appreciated.
I am trying to implement a mixed-effet repeated measures model that was described by Hamlett, Ryan, Serrano-Trespalacios & Wolfinger in their paper entitled "" (Journal of Air and Waste Management Association, 2003. 53:4 442-50). The paper appears to be freely accessible from the publisher.
The model is described mathematically, where repeated measures are taken on individuals using two different, correlated, measurements. They then give a worked example of implementing the model in SAS. From reading the article, I know there should be a random-effect for the measurement type with an unstructured covariance matrix, and then residual errors of each replicate to be nested within each individual. I can't seem to wrap my head around the appropriate syntax for -mixed-.
I've provided a data example below. My best guess at the syntax would be:
Code:
mixed response ibn.vtype, nocons || person : vtype, cov(un) || _all : , nocons resid(ind, by(vtype) t(repl))
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(personid vtype replicate) double(response) 1 1 1 6.68 1 2 1 3.97 1 1 2 6.53 1 2 2 4.12 1 1 3 6.43 1 2 3 4.09 1 1 4 6.33 1 2 4 3.97 2 1 1 6.85 2 2 1 5.27 2 1 2 7.06 2 2 2 5.37 2 1 3 7.13 2 2 3 5.41 2 1 4 7.17 2 2 4 5.44 3 1 1 7.4 3 2 1 5.67 3 1 2 7.42 3 2 2 3.64 3 1 3 7.41 3 2 3 4.32 3 1 4 7.37 3 2 4 4.73 3 1 5 7.34 3 2 5 4.96 3 1 6 7.35 3 2 6 5.04 3 1 7 7.28 3 2 7 5.22 3 1 8 7.3 3 2 8 4.82 3 1 9 7.34 3 2 9 5.07 4 1 1 7.36 4 2 1 5.67 4 1 2 7.33 4 2 2 5.1 4 1 3 7.29 4 2 3 5.53 4 1 4 7.3 4 2 4 4.75 4 1 5 7.35 4 2 5 5.51 5 1 1 7.35 5 2 1 4.28 5 1 2 7.3 5 2 2 4.44 5 1 3 7.3 5 2 3 4.32 5 1 4 7.37 5 2 4 3.23 5 1 5 7.27 5 2 5 4.46 5 1 6 7.28 5 2 6 4.72 5 1 7 7.32 5 2 7 4.75 5 1 8 7.32 5 2 8 4.99 6 1 1 7.38 6 2 1 4.78 6 1 2 7.3 6 2 2 4.73 6 1 3 7.29 6 2 3 5.12 6 1 4 7.33 6 2 4 4.93 6 1 5 7.31 6 2 5 5.03 6 1 6 7.33 6 2 6 4.93 7 1 1 6.86 7 2 1 6.85 7 1 2 6.94 7 2 2 6.44 7 1 3 6.92 7 2 3 6.52 8 1 1 7.19 8 2 1 5.28 8 1 2 7.29 8 2 2 4.56 8 1 3 7.21 8 2 3 4.34 8 1 4 7.25 8 2 4 4.32 8 1 5 7.2 8 2 5 4.41 8 1 6 7.19 8 2 6 3.69 8 1 7 6.77 8 2 7 6.09 8 1 8 6.82 8 2 8 5.58 end
Comment