<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Mixed model with different numbers of repeated measures... in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-model-with-different-numbers-of-repeated-measures/m-p/50735#M2238</link>
    <description>Hi there,&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Here’s the study:&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
So the factors in the study are:&lt;BR /&gt;
TMT (within: baseline and threat)&lt;BR /&gt;
Material prime (between: yes or no)&lt;BR /&gt;
Self-consistency scale (between, continuous)&lt;BR /&gt;
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).&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
The data is currently organized like this (this is a simplified version):                   &lt;BR /&gt;
Subj	Possession	TMT	    Prime	Consistency	Extrinsicness Location &lt;BR /&gt;
1	Teddy bear	Base	        1	2.3	                3.5                  12 &lt;BR /&gt;
1	Teddy bear	Death	1	2.3	                3.5                  19&lt;BR /&gt;
2	TV	                Base	        0	4.8	                5.5                  23             &lt;BR /&gt;
2	TV	                Death	0	4.8	                5.5                  20&lt;BR /&gt;
2	T-shirt	        Base	        0	4.8	                5.5                  36&lt;BR /&gt;
2	T-shirt	        Death 	0	4.8	                5.5                  18 &lt;BR /&gt;
&lt;BR /&gt;
So the DV could be a change score (location difference score) or two DVs, with location for each level of TMT.&lt;BR /&gt;
&lt;BR /&gt;
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).&lt;BR /&gt;
&lt;BR /&gt;
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...&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be much appreciated!&lt;BR /&gt;
Sarah.&lt;BR /&gt;
:)</description>
    <pubDate>Thu, 14 Apr 2011 19:00:47 GMT</pubDate>
    <dc:creator>sgmoore</dc:creator>
    <dc:date>2011-04-14T19:00:47Z</dc:date>
    <item>
      <title>Mixed model with different numbers of repeated measures...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-model-with-different-numbers-of-repeated-measures/m-p/50735#M2238</link>
      <description>Hi there,&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Here’s the study:&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
So the factors in the study are:&lt;BR /&gt;
TMT (within: baseline and threat)&lt;BR /&gt;
Material prime (between: yes or no)&lt;BR /&gt;
Self-consistency scale (between, continuous)&lt;BR /&gt;
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).&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
The data is currently organized like this (this is a simplified version):                   &lt;BR /&gt;
Subj	Possession	TMT	    Prime	Consistency	Extrinsicness Location &lt;BR /&gt;
1	Teddy bear	Base	        1	2.3	                3.5                  12 &lt;BR /&gt;
1	Teddy bear	Death	1	2.3	                3.5                  19&lt;BR /&gt;
2	TV	                Base	        0	4.8	                5.5                  23             &lt;BR /&gt;
2	TV	                Death	0	4.8	                5.5                  20&lt;BR /&gt;
2	T-shirt	        Base	        0	4.8	                5.5                  36&lt;BR /&gt;
2	T-shirt	        Death 	0	4.8	                5.5                  18 &lt;BR /&gt;
&lt;BR /&gt;
So the DV could be a change score (location difference score) or two DVs, with location for each level of TMT.&lt;BR /&gt;
&lt;BR /&gt;
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).&lt;BR /&gt;
&lt;BR /&gt;
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...&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be much appreciated!&lt;BR /&gt;
Sarah.&lt;BR /&gt;
:)</description>
      <pubDate>Thu, 14 Apr 2011 19:00:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-model-with-different-numbers-of-repeated-measures/m-p/50735#M2238</guid>
      <dc:creator>sgmoore</dc:creator>
      <dc:date>2011-04-14T19:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed model with different numbers of repeated measures...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mixed-model-with-different-numbers-of-repeated-measures/m-p/50736#M2239</link>
      <description>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:&lt;BR /&gt;
&lt;BR /&gt;
proc glimmix data=&lt;DSN&gt; ic=q;&lt;BR /&gt;
class subj possession tmt prime;&lt;BR /&gt;
model location=prime consistency consistency*prime tmt tmt*prime extrinsicness extrinsicness*tmt/ddfm=kr(firstorder) s;&lt;BR /&gt;
random possession/subject=subj &lt;TYPE&gt;;&lt;BR /&gt;
random tmt/residual subject=subj*possession type=chol;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
I really hope you get more answers on this one, as I feel this is just dipping one toe into the pond.&lt;BR /&gt;
&lt;BR /&gt;
SteveDenham&lt;/TYPE&gt;&lt;/DSN&gt;</description>
      <pubDate>Fri, 15 Apr 2011 10:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mixed-model-with-different-numbers-of-repeated-measures/m-p/50736#M2239</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2011-04-15T10:53:43Z</dc:date>
    </item>
  </channel>
</rss>

