Dear Friends, I
want to take a look at a 6 X 6 Repeated ANOVA within the framework of SPSS
Mixed. I’ve never used SPSS Mixed before. The first IV is Attribute
(categorical) and the second is Stage (6 points in time). The DV is importance
ratings. I restructured the original data. The Data Editor headings
now are: ID, Attribute, Stage, Importance . Here is the syntax I created: MIXED Importance WITH Attribute Stage /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1)
SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
PCONVERGE(0.000001, ABSOLUTE) /FIXED=Attribute Stage Attribute*Stage | SSTYPE(3) /METHOD=REML /PRINT=TESTCOV /RANDOM=INTERCEPT Attribute Stage Attribute*Stage |
SUBJECT(ID) COVTYPE(UN). Is it correct to declare the two IVs in the /FIXED
subcommand? Is there a good reference for applying MLM to repeated ANOVA
designs? Any assistance will be greatly appreciated. Stephen Salbod, Pace University, NYC |
Stephen,
Before I offer up some code, let me show you what I'm guessing your data set looks like: ID Stage Attribute Importance 1 1 1 5 1 2 2 4 1 3 4 3 1 4 2 2 1 5 1 3 1 6 3 2 2 1 3 3 2 2 2 1 2 3 3 2 2 4 4 4 2 5 3 5 2 6 6 4 . . . N Am I correct? Also, are you sure you want "attribute" and "stage" to be treated as continuous variables? Assuming you do, here's some code to consider: MIXED Importance WITH Attribute BY Stage /FIXED=Attribute Stage Attribute*Stage | SSTYPE(3) /METHOD=REML /REPEATED=Stage | SUBJECT(ID) COVTYPE(UN). I've replaced your RANDOM statement with a REPEATED statement to account for the within-subject correlation of error terms due to the repeated measures. I specified an unstructured var-cov matrix, since this is usually a good starting point. However, it does use up degrees of freedom. You might also consider an autoregressive type which assumes a decay in correlations based on the amount of time between observations. Within the autoregressive type, you could consider allowing for heterogeneous variances. You could consider adding back in a RANDOM statement to account for varying person random intercepts, varying slopes and perhaps allowing for co-variation between these terms, but it's critical that you understand fully what each term represents. To help get you started, the random intercept term captures person-to-person variability on average level of importance, while random slope terms capture variability in the slopes from person to person. It's likely that assigning all possible random slopes would be excessive. You may not need any random terms, but I cannot say from the information you've provided. Typically, when I'm building mixed models I start very simple and build slowly, making sure that each additional term is worth including. Mixed models can become unwieldy and over-specified quite easily. A good primer is "SAS for Mixed Models," 2nd edition. A couple other books I've found helpful include "Applied Multilevel Analysis" by Twisk and "Multilevel Analysis for Applied Research: It's Just Regression!" by Bickel. There's a tremendous amount of online documentation using various software programs (i.e. SPSS, SAS, STATA) that I've found very helpful as well. HTH, Ryan
|
Correction to the first line of the MIXED code I provided:
MIXED Importance WITH Attribute Stage Apologies. Ryan
|
In reply to this post by Ryan
I think the comment about /Repeated was very useful. I'm struggling with the analysis of a repeated-measures design too. Now, I'm using the following command in SPSS:
MIXED rating BY magnitude left_parity replicate Category /FIXED=magnitude left_parity Category replicate | SSTYPE(3) /METHOD=ML /PRINT=G SOLUTION /REPEATED=Category | SUBJECT(resp_id) COVTYPE(UN). However, in most textbooks and articles I see people using /Random instead to define a subject-specific intercept. I even read somewhere that it's mandatory to add a random intercept (next to the /repeated command). This latter option is not working for me (the model is not converging). The one and only thing I'm trying to overcome is the non-independence of the data. Also, if the command above is indeed correct, how would I formulate this model? When using a subject-specific intercept I understand I need a second equation. But what if I use only the repeated-command? I read in that case, it's actually not a mixed, but a marginal model: http://www.analysisfactor.com/statchat/repeated-measures-approaches/ http://www.analysisfactor.com/statchat/wacky-hessian-matrix/ http://www.biostat.jhsph.edu/~kbroche/Aging%20-%20PDF/Longitudinal%20Analysis%E2%80%94Better%20than%20Ezra.pdf But how would you formulate such a model? Any help would be very welcome! Of course, I would be more than happy than explain my design a bit more. Thanks!! |
I'll try to explain my situation a bit more, it might help answering my question. Below is an overview of my design.
Group Cat1 Cat2 Cat3 Cat4 1 AA1 AB2 BA3 BB4 2 AB3 BA4 BB1 AA2 ... 16 BB2 AA3 AB4 BB1 So, each respondents evaluates 4 stimuli in four different categories, which is the (ordinal) DV. The stimuli are constructed based on three factors; factor 1 (A or B), factor 2 (A or B) and four replications within the combination of factors (1,2,3 or 4). I'm interested in the effect of factor 1 and 2, controlling for the different replications and categories. Consequently, the data looks like this: Subj F1 F2 Rep Cat Evualation 1 A A 1 1 3.1 1 A B 2 2 2.4 1 B A 3 3 3.0 1 B B 4 4 1.0 2 ....... A regular linear regression won't work, since there's autocorrelation due to the non-independence of the observations (4 observations for each cluster/subject). So, using the literature on MLM, I'm trying to formulate, for example using the following syntax: MIXED evaluation BY F1 F2 Rep Cat /FIXED=BY F1 F2 Rep Cat | SSTYPE(3) /METHOD=ML /PRINT=G SOLUTION /REPEATED=Cat | SUBJECT(subj) COVTYPE(UN). However, I cannot figure out if I should add a '/random' statement defining random intercepts (either in combination with the '/repeated' statement) or that this is in fact realized by the repeated statement itself. Could anyone advise me on the right syntax/model (formulation). I would be very thankful! |
To spss:
We are in the process of updating to 19 and the question is how many patches are there to be added and where are they located, very specifically. So, our received version is stated to be 19.0.0. These are 'stand-alone' installations on 32 bit x86 machines. So, (Let me add that we have looked at the ibm website and it is unintelligible. In one place there appears to be only one patch, but in another place we found later patches. 32 bit seems to be lumped with 64 bit. There is something called 'adapter'.) 1) What is the specific ibm terminology that applies to our installation. 2) How many patches are there to be installed? 3) Where specifically are they, each one, if more than one, located? Gene Maguin ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Gene, there is just 1, that I am aware of, and it can be found at
Development Central https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/comm unityview?communityUuid=ab16c38e-2f7b-4912-a47e-85682d124d32 WMB Statistical Services ============ mailto: [hidden email] http:\\home.earthlink.net\~info.statman Skype & Google Talk: zstatman ============ -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gene Maguin Sent: Tuesday, August 09, 2011 2:23 PM To: [hidden email] Subject: Patches to 19 To spss: We are in the process of updating to 19 and the question is how many patches are there to be added and where are they located, very specifically. So, our received version is stated to be 19.0.0. These are 'stand-alone' installations on 32 bit x86 machines. So, (Let me add that we have looked at the ibm website and it is unintelligible. In one place there appears to be only one patch, but in another place we found later patches. 32 bit seems to be lumped with 64 bit. There is something called 'adapter'.) 1) What is the specific ibm terminology that applies to our installation. 2) How many patches are there to be installed? 3) Where specifically are they, each one, if more than one, located? Gene Maguin ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Will
Statistical Services ============ info.statman@earthlink.net http://home.earthlink.net/~z_statman/ ============ |
In reply to this post by nivvle
You do not have to estimate subject-specific intercepts via a RANDOM
statement JUST because you've incorporated a REPEATED statement to account for correlated residuals. As an aside, I'm not sure why you're printing the G matrix without having included a RANDOM statement. Ryan On Fri, Aug 5, 2011 at 5:06 AM, nivvle <[hidden email]> wrote: > I think the comment about /Repeated was very useful. I'm struggling with the > analysis of a repeated-measures design too. Now, I'm using the following > command in SPSS: > > MIXED rating BY magnitude left_parity replicate Category > /FIXED=magnitude left_parity Category replicate | SSTYPE(3) > /METHOD=ML > /PRINT=G SOLUTION > /REPEATED=Category | SUBJECT(resp_id) COVTYPE(UN). > > However, in most textbooks and articles I see people using /Random instead > to define a subject-specific intercept. I even read somewhere that it's > mandatory to add a random intercept (next to the /repeated command). This > latter option is not working for me (the model is not converging). > > The one and only thing I'm trying to overcome is the non-independence of the > data. Also, if the command above is indeed correct, how would I formulate > this model? When using a subject-specific intercept I understand I need a > second equation. But what if I use only the repeated-command? I read in that > case, it's actually not a mixed, but a marginal model: > > http://www.analysisfactor.com/statchat/repeated-measures-approaches/ > http://www.analysisfactor.com/statchat/wacky-hessian-matrix/ > http://www.biostat.jhsph.edu/~kbroche/Aging%20-%20PDF/Longitudinal%20Analysis%E2%80%94Better%20than%20Ezra.pdf > > But how would you formulate such a model? Any help would be very welcome! Of > course, I would be more than happy than explain my design a bit more. > > Thanks!! > > -- > View this message in context: http://spssx-discussion.1045642.n5.nabble.com/MLM-Question-tp1092562p4669058.html > Sent from the SPSSX Discussion mailing list archive at Nabble.com. > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Thanks! So let me get this clear. I know the difference between a Marginal Model and a Mixed Model. The only reasons I'm trying this advanced stuff is because I have repeated measures data. So if you're saying I could also use a Marginal Model to account for the correlation, I'm more than fine with that. As a matter fo fact, I tried estimating the model with and without random intercept (even with a random effect of category) and (based on the -2 log likelikhood) it is not a better fit.
Can I thus conclude it's okay to use a Marginal Model with just the repeated statement? If so, I have to find out how to formulate one in terms of y=b0 + b1X + e but I think that's just a matter of correctly specifying the error term, or not? Ohw and btw, the 'G' thing is probably a leftover of previous syntax in which I did incorporate a random effect. |
Līdz 29.augustam atrodos atvaļinājumā, nepieciešamības gadījumā lūdzu kontaktēties ar Gati Ošu ([hidden email]) Until August 29th I'm on vacation with limited access to emails. In case of emergency please contact Gatis Oss ([hidden email]) |
In reply to this post by nivvle
Comments below:
On Fri, Aug 12, 2011 at 4:06 AM, nivvle <[hidden email]> wrote: > Thanks! So let me get this clear. I know the difference between a Marginal > Model and a Mixed Model. Not that your terminology is wrong, but I'd probably say "Marginal model" and a "Subject-Specific model." The only reasons I'm trying this advanced stuff is > because I have repeated measures data. So if you're saying I could also use > a Marginal Model to account for the correlation, I'm more than fine with > that. As a matter fo fact, I tried estimating the model with and without > random intercept (even with a random effect of category) and (based on the > -2 log likelikhood) it is not a better fit. If inclusion of the random intercept does not improve model fit, then I would probably leave it out for this situation. Now, you haven't reported the residual estimated variances and covariances. I have no idea if the UNstructured structure is optimal. > > Can I thus conclude it's okay to use a Marginal Model with just the repeated > statement? There are a number of examples online and in textbooks where repeated measures are modeled via linear mixed modelling by relaxing the default assumption that residual correlations among observations equals 0 (e.g., compound symmetric, autoregressive, unstructured, etc.). If so, I have to find out how to formulate one in terms of y=b0 + > b1X + e but I think that's just a matter of correctly specifying the error > term, or not? Yes, you should indicate the residual variance-covariance structure. > > Ohw and btw, the 'G' thing is probably a leftover of previous syntax in > which I did incorporate a random effect. > > -- > View this message in context: http://spssx-discussion.1045642.n5.nabble.com/MLM-Question-tp1092562p4692461.html > Sent from the SPSSX Discussion mailing list archive at Nabble.com. > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Thanks! Very helpful!
First of all, thanks for the hint on the proper terminology. As for the structure, I just used a pragmatic approach in which I estimated the model using various structures and determined the fit (which was best for unstructured). However, could I also determine the most appropriate structure based on the output? I'm guessing that's a yes so I printed the R matrix for the following syntax: MIXED rating BY category magnitude left_parity replicate educat gender age nage WITH av_resp_rating av_respcat_rating /FIXED= category magnitude left_parity replicate educat nage | SSTYPE(3) /METHOD=ML /PRINT=SOLUTION COVB R TESTCOV /REPEATED=Observation | SUBJECT(resp_id) COVTYPE(UNR). Residual Covariance (R) Matrix(a) [Observation = 3] [Observation = 5] [Observation = 10] [Observation = 16] [Observation = 3] 1.117450 .571000 .358132 .706889 [Observation = 5] .571000 1.061410 .421531 .681090 [Observation = 10] .358132 .421531 .996545 .561223 [Observation = 16] .706889 .681090 .561223 1.429828 Unstructured Correlations a. Dependent Variable: rating. Doesn't this show that correlations between repeated measures are unequal (first row/column) and covariances too (numbers on the diagonal)? I'm just guessing here :P Great, so I can just use the 'regular' regression notation for the model. Assuming for now the uncorrelated structure is indeed appropriate, what would be the notation for the error term? Thanks again for your help, I appreciate it! |
I do not see a discernible pattern in the residual matrix, except to
say that there does appear to be heterogeneous residual variances and correlations; an unstructured matrix may very well be the most appropriate. This evidence coupled with global fit statistic comparisons should guide you to the optimal residual structure. I do wonder how the repeated measurements are spaced and if Observation={value} means the same thing for each subject. Remember that with the UNR structure the on-diagonal elements reflect the variances and the off-diagonal elements are correlations. Also, I notice that you are employing ML estimation. I suggest you switch to the default REML. It's difficult for me to provide additional advice without knowing more about what these repeated measures represent and your study design, in general. At any rate, a simpler version of your model with a single covariate and (UN)structured residual covariance matrix could be expressed as: y_ij = alpha + (beta)x_ij + epsilon_ij where y_ij = measurement on the dependent variable for the jth observation of the ith subject alpha = fixed intercept beta = regression coefficient for the covariate x_ij = measurement on the covariate, x, for the jth observation of the ith subject epsilon_ij = random error associated with the jth observation of the ith subject with Var(epsilon_ij)=sigma^2_j and Cov(epsilon_ij, epsilon_ij')=sigma_jj'. This model assumes the errors across subjects are uncorrelated. I might have made an error with the notation--upon a quick second glance it looks correct, but I suggest you double check on your own. Ryan On Sat, Aug 13, 2011 at 3:09 AM, nivvle <[hidden email]> wrote: > Thanks! Very helpful! > > First of all, thanks for the hint on the proper terminology. As for the > structure, I just used a pragmatic approach in which I estimated the model > using various structures and determined the fit (which was best for > unstructured). However, could I also determine the most appropriate > structure based on the output? I'm guessing that's a yes so I printed the R > matrix for the following syntax: > > MIXED rating BY category magnitude left_parity replicate educat gender age > nage WITH av_resp_rating av_respcat_rating > /FIXED= category magnitude left_parity replicate educat nage | SSTYPE(3) > /METHOD=ML > /PRINT=SOLUTION COVB R TESTCOV > /REPEATED=Observation | SUBJECT(resp_id) COVTYPE(UNR). > > > Residual Covariance (R) Matrix(a) > [Observation = 3] [Observation = 5] [Observation = 10] [Observation = > 16] > [Observation = 3] 1.117450 .571000 .358132 .706889 > [Observation = 5] .571000 1.061410 .421531 .681090 > [Observation = 10] .358132 .421531 .996545 .561223 > [Observation = 16] .706889 .681090 .561223 1.429828 > Unstructured Correlations > a. Dependent Variable: rating. > > Doesn't this show that correlations between repeated measures are unequal > (first row/column) and covariances too (numbers on the diagonal)? I'm just > guessing here :P > > Great, so I can just use the 'regular' regression notation for the model. > Assuming for now the uncorrelated structure is indeed appropriate, what > would be the notation for the error term? > > Thanks again for your help, I appreciate it! > > > -- > View this message in context: http://spssx-discussion.1045642.n5.nabble.com/MLM-Question-tp1092562p4695612.html > Sent from the SPSSX Discussion mailing list archive at Nabble.com. > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Thanks for you reply!!
Thanks for your advice on the proper structure. The observations are all part of one survey and thus collected at (approx.) the same point in time. In between the observations, I used filler questions. They are measured using a 7-point semantic differential scale. Does that clarify the observations enough? I'm not exactly sure what you're trying to say with the comment about the UNR-structure. Do you still think it's appropriate? Alternatively, I could use UN, but it doesn't result in a better fit for simpler models. It does, however, result in non-converging models when they get more complicated. I used ML since the literature learns me that comparison of the fit-statistics (-2 log likelihood) is only possible when using this estimation method. However, I saw different authors argue for the two different options. What's your reasoning here? I'll have to take my time to look into the whole model formulation though. For example, doesn't your model incorporate a random effect (since the Beta is different for each subject) next to the random error? And why does that model assumes UNcorrelated errors? Isn't the whole point of this to account for/model the (present) correlation of the error terms? Or is this just my confusion? Sorry for all the questions, this is somewhat outside my area of expertise.. |
The equation I wrote included a fixed effect ("beta") associated with
the covariate ("x"), not a random effect. Note that the subscript "ij" from x_ij simply indicates that the measurements on the covariate, x, vary across observations for each subject. Also, I stated that the errors ACROSS subjects are assumed to be uncorrelated. The model does allow for WITHIN-subject residual correlation. No time to respond further right now. Ryan On Thu, Aug 18, 2011 at 1:45 PM, nivvle <[hidden email]> wrote: > Thanks for you reply!! > > Thanks for your advice on the proper structure. The observations are all > part of one survey and thus collected at (approx.) the same point in time. > In between the observations, I used filler questions. They are measured > using a 7-point semantic differential scale. Does that clarify the > observations enough? > > I'm not exactly sure what you're trying to say with the comment about the > UNR-structure. Do you still think it's appropriate? Alternatively, I could > use UN, but it doesn't result in a better fit for simpler models. It does, > however, result in non-converging models when they get more complicated. > > I used ML since the literature learns me that comparison of the > fit-statistics (-2 log likelihood) is only possible when using this > estimation method. However, I saw different authors argue for the two > different options. What's your reasoning here? > > I'll have to take my time to look into the whole model formulation though. > For example, doesn't your model incorporate a random effect (since the Beta > is different for each subject) next to the random error? And why does that > model assumes UNcorrelated errors? Isn't the whole point of this to account > for/model the (present) correlation of the error terms? Or is this just my > confusion? Sorry for all the questions, this is somewhat outside my area of > expertise.. > > -- > View this message in context: http://spssx-discussion.1045642.n5.nabble.com/MLM-Question-tp1092562p4712859.html > Sent from the SPSSX Discussion mailing list archive at Nabble.com. > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
I totally understand, don't know why I didn't get that in the first place.
Thanks again and if you would like to comment on the observations thing later when you have some time, I would appreciate. No need to rush though. |
Free forum by Nabble | Edit this page |