Programming the statistical procedures from SAS

Mixed model with different numbers of repeated measures...

Reply
N/A
Posts: 1

Mixed model with different numbers of repeated measures...

Hi there,

I'm trying to help a colleague analyze some experimental data, and we're completely stumped on how to write the SAS code - it's a rather complicated mixed design.

Here’s the study:
All participants took part in a two day study – one day was the baseline condition and the other day was a TMT threat manipulation (within subjects). On the baseline day they also completed a self-consistency scale (between subjects). They also received a materialism prime or a neutral prime, which was the same on both days (between subjects). On both days they completed a circle where they listed personal possessions. And both days they indicated the extrinsicness of each of the possessions (so the number of possessions would have differed across people and the number of times they would have completed the extrinsicness scale would have also differed). The DV are the two locations of the possessions that participants indicated on the separate days.

So the factors in the study are:
TMT (within: baseline and threat)
Material prime (between: yes or no)
Self-consistency scale (between, continuous)
Extrinsicness of a possession (continuous, within. Also, there are different numbers of times this measure was assessed as it was asked for each possession and people listed different numbers of possessions – they also completed this both days and so this could be analyzed also as dv (the change in the extrinsicness of the possession).

DV: Location of the possession (change in distance (in millimeters) between the two days, or day 1 location and day 2 location). Only those possessions that were included on both days would be analyzed.

The data is currently organized like this (this is a simplified version):
Subj Possession TMT Prime Consistency Extrinsicness Location
1 Teddy bear Base 1 2.3 3.5 12
1 Teddy bear Death 1 2.3 3.5 19
2 TV Base 0 4.8 5.5 23
2 TV Death 0 4.8 5.5 20
2 T-shirt Base 0 4.8 5.5 36
2 T-shirt Death 0 4.8 5.5 18

So the DV could be a change score (location difference score) or two DVs, with location for each level of TMT.

If there was only one set of possessions per person, this wouldn’t be a problem, I don’t think; it would be a basic mixed design, with subject nested in TMT. The issue we can't work out is how to let SAS know that Possession is also within subjects, and that there are different numbers of possessions listed per subject (though note that the identity of the possession itself is irrelevant).

I know you can nest two variables within subject, i.e., subject(tmt possession), but this makes possession seem like a factor, and since there are so many different possessions, it sucks up huge numbers of DFs - and I can't get SAS to spit anything out no matter what error term or model we specify, I think because there are different numbers of repeated measures per person - and without including Possession as a factor, presumably the program doesn't know which pairs within person to examine...

Does anyone have any ideas about what kind of model we could run on this data? I know how to transpose the data, if it is easier to have one subject per row instead.

Any help would be much appreciated!
Sarah.
Smiley Happy
Respected Advisor
Posts: 2,655

Re: Mixed model with different numbers of repeated measures...

No code, only some thoughts at first. These might make it possible to address what you are looking for. Possession is some sort of factor, what it looks like to me is a random effect. Unfortunately, that doesn't seem to help much. What would happen if you considered the subject to be subj*possession, and possession as a random effect. I think you would get an analysis that is relatively complete then if you tried:

proc glimmix data= ic=q;
class subj possession tmt prime;
model location=prime consistency consistency*prime tmt tmt*prime extrinsicness extrinsicness*tmt/ddfm=kr(firstorder) s;
random possession/subject=subj ;
random tmt/residual subject=subj*possession type=chol;
run;

Note that I really don't have a good idea for the type of covariance structure for the first random statement. If you have the computing power available, the obvious choice would be unstructured, using type=chol.

I really hope you get more answers on this one, as I feel this is just dipping one toe into the pond.

SteveDenham
Ask a Question
Discussion stats
  • 1 reply
  • 49 views
  • 0 likes
  • 2 in conversation