|
Hi all, Stumped on what should be a straight forward one. I’m using MIXED for a simple 2x2 between subjects fixed effects model, and want to define a TEST command for testing one level of the interaction against the combination of the other three.
I thought it would simply be: /TEST 'A2B2 v AllOthers' FactorA*FactorB -1 -1 -1 3 But evidently not, as I get a L matrix not estimable message. Any tips as to what I’m missing? This isn’t very different from the TEST commands I’m used to running so I can’t see what I’m doing wrong this time.
Kylie. |
|
I am currently out of the office and will return your message upon my return. Thanks. |
|
In reply to this post by Kylie
Thank you for your email.
I am off-site at workshops with limited access to my email. I will be returning to the office on Friday September 21. If you need immediate assistance please contact Nina Zivkovic at [hidden email] or at 905-851-8821, ext. 246. Thank you. Valerie Villella Education Coordinator & Policy and Program Analyst ===================== 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 |
|
Administrator
|
In reply to this post by Kylie
I replicated your issue and don't really know how to prod MIXED into giving up the goods for the interaction.
OTOH: The following might be useful: DATA LIST FREE / A B y . BEGIN DATA 1 1 10 1 1 23 1 1 12 1 2 32 1 2 21 1 2 10 2 1 11 2 1 32 2 1 12 2 2 21 2 2 12 2 2 10 END DATA. MIXED y BY A B /FIXED = A B A*B /TEST 'test Int' A*B -1 -1 -1 3 . COMPUTE ONE=(A-1)*2 +B. MIXED y BY ONE /FIXED = ONE /TEST 'test Int' ONE -1 -1 -1 3 .
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
|
Try:
MIXED y BY A B /FIXED = A*B /TEST 'test Int' A*B -1 -1 -1 3 . I'm guessing the problem is that in: MIXED y BY A B /FIXED = A B A*B /TEST 'test Int' A*B -1 -1 -1 3 . the A*B term has only 1 df. Alex From: David Marso <[hidden email]> To: [hidden email], Date: 09/18/2012 04:57 AM Subject: Re: TEST contrast for MIXED Sent by: "SPSSX(r) Discussion" <[hidden email]> I replicated your issue and don't really know how to prod MIXED into giving up the goods for the interaction. OTOH: The following might be useful: DATA LIST FREE / A B y . BEGIN DATA 1 1 10 1 1 23 1 1 12 1 2 32 1 2 21 1 2 10 2 1 11 2 1 32 2 1 12 2 2 21 2 2 12 2 2 10 END DATA. MIXED y BY A B /FIXED = A B A*B /TEST 'test Int' A*B -1 -1 -1 3 . COMPUTE ONE=(A-1)*2 +B. MIXED y BY ONE /FIXED = ONE /TEST 'test Int' ONE -1 -1 -1 3 . Kylie Lange-3 wrote > Hi all, > > Stumped on what should be a straight forward one. I'm using MIXED for a > simple 2x2 between subjects fixed effects model, and want to define a TEST > command for testing one level of the interaction against the combination > of the other three. I thought it would simply be: > > /TEST 'A2B2 v AllOthers' FactorA*FactorB -1 -1 -1 3 > > But evidently not, as I get a L matrix not estimable message. Any tips as > to what I'm missing? This isn't very different from the TEST commands I'm > used to running so I can't see what I'm doing wrong this time. > > Thanks, > Kylie. |
|
Administrator
|
Good call, Alex. Notice that the following two models (using David's sample data) produce the same information criteria too.
MIXED y BY A B /FIXED = A B A*B . MIXED y BY A B /FIXED = A*B /TEST 'test Int' A*B -1 -1 -1 3 . -2 Restricted LL = 62.748 for both. So you're getting the same model, despite omission of A and B in the second one. (I'm still trying to work out why that is so.)
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
Since A and B were binary categorical variables, wasn't the model over-estimated with A and B in the model? They were redundant terms adding no additional information.
Matthew J Poes Research Data Specialist Center for Prevention Research and Development University of Illinois 510 Devonshire Dr. Champaign, IL 61820 Phone: 217-265-4576 email: [hidden email] -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: Tuesday, September 18, 2012 9:21 AM To: [hidden email] Subject: Re: TEST contrast for MIXED Good call, Alex. Notice that the following two models (using David's sample data) produce the same information criteria too. MIXED y BY A B /FIXED = A B A*B . MIXED y BY A B /FIXED = A*B /TEST 'test Int' A*B -1 -1 -1 3 . -2 Restricted LL = 62.748 for both. So you're getting the same model, despite omission of A and B in the second one. (I'm still trying to work out why that is so.) Alex Reutter wrote > Try: > > MIXED y BY A B /FIXED = A*B /TEST 'test Int' A*B -1 -1 -1 3 . > > I'm guessing the problem is that in: > > MIXED y BY A B /FIXED = A B A*B /TEST 'test Int' A*B -1 -1 -1 3 . > > the A*B term has only 1 df. > > Alex > > > > > From: David Marso < > david.marso@ > > > To: > SPSSX-L@.uga > , > Date: 09/18/2012 04:57 AM > Subject: Re: TEST contrast for MIXED > Sent by: "SPSSX(r) Discussion" < > SPSSX-L@.uga > > > > > > I replicated your issue and don't really know how to prod MIXED into > giving up the goods for the interaction. > OTOH: The following might be useful: > > DATA LIST FREE / A B y . > BEGIN DATA > 1 1 10 1 1 23 1 1 12 1 2 32 1 2 21 1 2 10 2 1 11 2 1 32 2 1 12 > 2 > 2 > 21 2 2 12 2 2 10 > END DATA. > > MIXED y BY A B /FIXED = A B A*B /TEST 'test Int' A*B -1 -1 -1 3 . > COMPUTE ONE=(A-1)*2 +B. > MIXED y BY ONE /FIXED = ONE /TEST 'test Int' ONE -1 -1 -1 3 . > > > > Kylie Lange-3 wrote >> Hi all, >> >> Stumped on what should be a straight forward one. I'm using MIXED for >> a simple 2x2 between subjects fixed effects model, and want to define >> a > TEST >> command for testing one level of the interaction against the >> combination of the other three. I thought it would simply be: >> >> /TEST 'A2B2 v AllOthers' FactorA*FactorB -1 -1 -1 3 >> >> But evidently not, as I get a L matrix not estimable message. Any >> tips > as >> to what I'm missing? This isn't very different from the TEST commands > I'm >> used to running so I can't see what I'm doing wrong this time. >> >> Thanks, >> Kylie. ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/TEST-contrast-for-MIXED-tp5715139p5715145.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 |
|
In reply to this post by Bruce Weaver
They're mathematically equivalent models.
If A and B are covariates, then they wouldn't be, but because A and
B are factors, they are.
Alex From: Bruce Weaver <[hidden email]> To: [hidden email], Date: 09/18/2012 09:28 AM Subject: Re: TEST contrast for MIXED Sent by: "SPSSX(r) Discussion" <[hidden email]> Good call, Alex. Notice that the following two models (using David's sample data) produce the same information criteria too. MIXED y BY A B /FIXED = A B A*B . MIXED y BY A B /FIXED = A*B /TEST 'test Int' A*B -1 -1 -1 3 . -2 Restricted LL = 62.748 for both. So you're getting the same model, despite omission of A and B in the second one. (I'm still trying to work out why that is so.) Alex Reutter wrote > Try: > > MIXED y BY A B /FIXED = A*B /TEST 'test Int' A*B -1 -1 -1 3 . > > I'm guessing the problem is that in: > > MIXED y BY A B /FIXED = A B A*B /TEST 'test Int' A*B -1 -1 -1 3 . > > the A*B term has only 1 df. > > Alex > > > > > From: David Marso < > david.marso@ > > > To: > SPSSX-L@.uga > , > Date: 09/18/2012 04:57 AM > Subject: Re: TEST contrast for MIXED > Sent by: "SPSSX(r) Discussion" < > SPSSX-L@.uga > > > > > > I replicated your issue and don't really know how to prod MIXED into > giving > up the goods for the interaction. > OTOH: The following might be useful: > > DATA LIST FREE / A B y . > BEGIN DATA > 1 1 10 1 1 23 1 1 12 1 2 32 1 2 21 1 2 10 2 1 11 2 1 32 2 1 12 2 > 2 > 21 2 2 12 2 2 10 > END DATA. > > MIXED y BY A B /FIXED = A B A*B /TEST 'test Int' A*B -1 -1 -1 3 . > COMPUTE ONE=(A-1)*2 +B. > MIXED y BY ONE /FIXED = ONE /TEST 'test Int' ONE -1 -1 -1 3 . > > > > Kylie Lange-3 wrote >> Hi all, >> >> Stumped on what should be a straight forward one. I'm using MIXED for a >> simple 2x2 between subjects fixed effects model, and want to define a > TEST >> command for testing one level of the interaction against the combination >> of the other three. I thought it would simply be: >> >> /TEST 'A2B2 v AllOthers' FactorA*FactorB -1 -1 -1 3 >> >> But evidently not, as I get a L matrix not estimable message. Any tips > as >> to what I'm missing? This isn't very different from the TEST commands > I'm >> used to running so I can't see what I'm doing wrong this time. >> >> Thanks, >> Kylie. |
|
Thanks to everyone who replied, and to Alex for the solution. I’m with Bruce in that excluding the main effects seems so /wrong/ but I can see why in this case
it works in the way that it does. For this simple example I was also able to replicate the contrast test in UNIANOVA with the following /LMATRIX command: /LMATRIX = "A2B2
vs All others" FactorA -2 2 FactorB -2 2 FactorA*FactorB -1 -1 -1 3 Thanks again, Kylie. From: SPSSX(r) Discussion [mailto:[hidden email]]
On Behalf Of Alex Reutter They're mathematically equivalent models. If A and B are covariates, then they wouldn't be, but because A and B are factors, they are.
|
|
Kylie, No time to explain, but I ran a quick simulation which will hopefully clarify matters. You will see that I took careful note to ensure the same divisor in order to achieve an estimable function, which by the way, produces the correct estimate. I also used the COMPUTE statement at the end of the code based on estimates from the EMMEANS Table to verify that the last TEST statement is in fact producing the correct value.
Best, Ryan *Generate data. set seed 98765432. new file. inp pro. loop ID= 1 to 400. IF (ID >= 1 and ID <=200) A=1. IF (ID >= 201 and ID <=400) A=2. IF ((ID >= 1 and ID <=100) or (ID >= 201 and ID <=300)) B=1. IF ((ID >= 101 and ID <=200) or (ID >= 301 and ID <=400)) B=2. comp b1 = 4.0. comp b2 = 3.0. comp b3 = 2.0. comp b4 = 1.0. comp y = b1*(A=1)*(B=1) + b2*(A=1)*(B=2) + b3*(A=2)*(B=1) + b4*(A=2)*(B=2) + rv.normal(0,1). end case. end loop. end file. end inp pro. exe.
*Delete temp variables. delete variables b1 b2 b3 b4. *Fit linear mixed model with contrast of interest.
MIXED y BY A B /FIXED=A B A*B | SSTYPE(3) /METHOD=REML /PRINT=DESCRIPTIVES SOLUTION /EMMEANS=TABLES(A*B) /TEST 'a1b1' intercept 1 A 1 0 B 1 0 A*B 1 0 0 0 /TEST 'a1b2' intercept 1 A 1 0 B 0 1 A*B 0 1 0 0 /TEST 'a2b1' intercept 1 A 0 1 B 1 0 A*B 0 0 1 0 /TEST 'a2b2' intercept 1 A 0 1 B 0 1 A*B 0 0 0 1 /TEST 'MEAN(a1b1, a1b2, a2b1)' intercept 3 A 2 1 B 2 1 A*B 1 1 1 0 DIVISOR=3 /TEST 'a2,b2; revised with divisor 3' intercept 3 A 0 3 B 0 3 A*B 0 0 0 3 DIVISOR=3 /TEST 'MEAN(a1b1, a1b2, a2b1) MINUS a2,b2; revised with divisor 3' intercept 0 A 2 -2 B 2 -2 A*B 1 1 1 -3 DIVISOR=3. *Confirm that the estimate produced from the last TEST statement is yielding the correct value. COMPUTE mean_a1b1_a1b2_a2b1_MINUS_a2b2=(( 3.744004904545084 + 2.8923383191693364 + 2.103149167662454 ) / 3) - .9668025694852479. EXECUTE. On Tue, Sep 18, 2012 at 8:30 PM, Kylie Lange <[hidden email]> wrote:
|
| Free forum by Nabble | Edit this page |
