|
I’m trying (and failing) to understand how to use the Test subcommand in mixed. I generated some data for a very simple 2-factor (3x2) model. The syntax is mixed y by a b/fixed=a b/print solution/ test 'a effect' a 1/3 1/3 1/3; a 1 -1 0; a 1 -1/2 -1/2/ test 'b effect' b 1/2 1/2; b 0 1. Now in the syntax reference (page 1124) there is a more complicated example but I’m copying the test statement given there for effect A. The problem is that my test for effect A and for effect B could not “be performed because the L matrix is not estimable.”
Can someone help me understand what is wrong and, far more importantly, why. Thanks, Gene Maguin |
|
I have not been using Mixed, but --
=====================
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
The examples that I find show that the intercept term is implicitly included in the model. That would make redundant the first test you show for each effect - which might make the matrix not-estimable unless you can specify a no-intercept model in Mixed. -- Rich Ulrich Date: Fri, 18 Sep 2015 15:29:41 +0000 From: [hidden email] Subject: using the test subcommand in mixed To: [hidden email] I’m trying (and failing) to understand how to use the Test subcommand in mixed.
I generated some data for a very simple 2-factor (3x2) model. The syntax is
mixed y by a b/fixed=a b/print solution/ test 'a effect' a 1/3 1/3 1/3; a 1 -1 0; a 1 -1/2 -1/2/ test 'b effect' b 1/2 1/2; b 0 1.
Now in the syntax reference (page 1124) there is a more complicated example but I’m copying the test statement given there for effect A.
The problem is that my test for effect A and for effect B could not “be performed because the L matrix is not estimable.”
Can someone help me understand what is wrong and, far more importantly, why. Thanks, Gene Maguin
|
|
In reply to this post by Maguin, Eugene
Gene, There is no interaction (A*B) effect in your model. That is, the effect of one factor does not depend on the levels of the other factor. This point is critical. Everything stated below assumes you did not want to incorporate an interaction term in your model. I've written syntax below to (1) generate data and (2) fit a model with TEST statements to estimate the effects of A and B using the MIXED procedure. To obtain the effect of A with the first TEST statement, I performed a joint test of two of the three possible simple contrasts, since A has three levels. The F test on the effect of A produced from the TEST statement is identical to the F test performed in "TYPE III FIXED EFFECTS" Table. To obtain the effect of B with the second TEST statement, I performed a simple contrast between levels one and two, since B has two levels. The t-statistic squared equals the F statistic in the "TYPE III FIXED EFFECTS" Table, and the p-values are equal. Feel free to write back if you have specific questions after reviewing the syntax and output. Ryan -- *GENERATE DATA. SET SEED 4836235. NEW FILE. INPUT PROGRAM. LOOP ID = 1 TO 100. IF (ID<= 33) A=1. IF (ID> 33 AND ID <= 67) A=2. IF (ID> 67) A=3. COMPUTE B = RV.BERNOULLI(0.50). COMPUTE Y = -2.0 + 1.5*(A=1) - 2.0*(A=2) + 1.0*(B=0) + RV.NORMAL(0,1). END CASE. END LOOP. END FILE. END INPUT PROGRAM. EXECUTE. *FIT MODEL. MIXED Y BY A B /FIXED=A B | SSTYPE(3) /METHOD=REML /PRINT=SOLUTION /TEST 'Effect of A' A 1 0 -1; A 0 1 -1 /TEST 'Effect of B' B 1 -1. On Fri, Sep 18, 2015 at 11:29 AM, Maguin, Eugene <[hidden email]> wrote:
|
|
Administrator
|
When the contrasts of interest are simple, pair-wise contrasts, as in this example, they can also be obtained (along with all other pair-wise contrasts) via the EMMEANS sub-command. E.g.,
*FIT MODEL. MIXED Y BY A B /FIXED=A B | SSTYPE(3) /METHOD=REML /PRINT=SOLUTION /TEST 'Effect of A' A 1 0 -1; A 0 1 -1 /TEST 'Effect of B' B 1 -1 /EMMEANS TABLES(A) COMPARE /EMMEANS TABLES(B) COMPARE . HTH.
--
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/). |
| Free forum by Nabble | Edit this page |
