** this program estimates the effect of treatment level for cross-sectional repeated measures ** ** Author: H. Allore ** ** Creation Date: 1/08/07 ** ** Update Date:11/20/08 **; /* This program will show possible ways to use correlated repeated measures taken cross-sectionally. The data is from a immulogy study where there was an interts whether older adults had different innate immune responses compared to younger adults. Toll-like-receptor are parts of the innate immune system that are stimulated with specific ligands to produce various products, such as cytokines as in this example. The mixed effects models use a unstructured covaraince structure because there is not a mathematicalfunctional relationsip between TLR cytokine production but there are correlated responses. Copyright (C) 2008 Heather G. Allore, PhD This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*From the SAS v9.1 manual: Random effects are classification effects with levels that are assumed to be randomly selected from an infinite population of possible levels. PROC VARCOMP estimates the contribution of each of the random effects to the variance of the dependent variable. We use this to determine whether after accounting for the fixed effects there is still an important amount of variation attributable to the subject */ libname tlr 'e:\\PepperCenter\Grasp\Submissions\LigandCytokCorrAllore\'; title1 'Proc Varcomp to see whether there is an effect of ID on variance'; title2 'age (young or old), ligand and their interaction are fixed effects.'; proc varcomp method =reml data=tlr.cd11chi_il6tnf; /* use method=reml because the same method is used for mixed below */ class id agegr ligand; model il6 = agegr ligand agegr*ligand id/fixed= 3; /* first three listed varaiblae are fixed effects */ run; /* results show that there is a meanigful amount of variaiblty remaining in the random sample of subjects*/ /* using the type=un option in the repeated statement will permit each person to have their own covariance matrix thus addrressing this additional subject variability */ title1 'Repeated model type=un'; title2 'Effect of age on cells stimulated by ligands for TLR expression of Il6 '; proc mixed data=tlr.cd11chi_il6tnf method=reml;/* using restricted maximum likelihood */ class id ligand agegr; /* here age is either young or old */ model il6 = agegr ligand agegr*ligand /s ddfm=KENWARDROGER; /* s requests that a solution for the fixed-effects parameters be produced*/ /* ddfm=kr As written in the SAS documentation when there isn't a RANDOM statements but a REPEATED statement with the TYPE=UN option DDFM=KENWARDROGER may be a better option to try for this case. In this case, all effects are assigned the between-subject degrees of freedom to provide for better small-sample approximations to the relevant sampling distributions. */ repeated / type=un subject=id rcorr;/* rcorr option is for correlations */ /* type=un unstructured covariance structure for R matrix */ lsmeans agegr*ligand/slice=ligand; /* provides the adj amount of adjil6pos for each age group */ /* slice=ligand test the effect of age for each level of ligand */ run;