Hello everyone,
I am trying to use the SOLUTION option on the Random subcommand in MIXED to get the individual slopes for all ids. I am running the syntax below but the output is bizarre. For the first 80 cases only the predicted values and the upper bound CI values are present in the Empirical Best Linear Unbiased Predictions table. Then, for the next 10 cases only the standard error values are entered. For the next set of 10 or so cases only the df are entered. And so on... Am I doing something wrong? Do I need to install a patch? I am running version 26 of SPSS. Thanks so much in advance!! Cheers Bozena MIXED vppE_1 WITH Time /FIXED = Time /Random = intercept Time | SUBJECT(SubID) COVTYPE(UN) SOLUTION /PRINT = SOLUTION TESTCOV G . ===================== 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 |
Well, I don't know about MIXED at the moment, my examples here for a specific
dataset run all fine and dandy for GENLINMIXED, https://andrewpwheeler.com/2019/12/01/making-caterpillar-plots-for-random-effects-in-spss/. This is with V26 and no fix packs. With that dataset if I run: MIXED TotalCrime BY FishID WITH TotalLic CFS /FIXED TotalLic CFS /RANDOM = FishID /SAVE FIXPRED(FixLin) PRED(FullPred) SEFIXP(SeFix) SEPRED(SeFull). It takes about 20 seconds and converges. But if I run with the solution command it just hangs for several minutes. MIXED TotalCrime BY FishID WITH TotalLic CFS /FIXED TotalLic CFS /RANDOM = FishID | SOLUTION. And I get impatient at that point and kill SPSS. Again GENLINMIXED for a pretty much equivalent model runs just fine and dandy: GENLINMIXED /FIELDS TARGET=TotalCrime /TARGET_OPTIONS DISTRIBUTION=NORMAL /FIXED EFFECTS=TotalLic CFS /RANDOM USE_INTERCEPT=TRUE SUBJECTS=FishID SOLUTION = TRUE. So while I can't replicate the exact behavior of the OP, it appears something strange is going on under the hood when including the SOLUTION argument for RANDOM effects in MIXED. ----- Andy W [hidden email] http://andrewpwheeler.wordpress.com/ -- Sent from: http://spssx-discussion.1045642.n5.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 |
Thanks so much for this, Andy.
As you said, the GENLINMIXED syntax below produces correctly the intercepts for each ID number. How can I modify it to also obtain Time slopes for each ID? GENLINMIXED /FIELDS TARGET=vppE_1 /TARGET_OPTIONS DISTRIBUTION=NORMAL /FIXED EFFECTS=Time /RANDOM USE_INTERCEPT=TRUE SUBJECTS=SubID SOLUTION = TRUE. Thanks again, Bozena -----Original Message----- From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Andy W Sent: February 22, 2021 6:55 AM To: [hidden email] Subject: Re: strange individual slope problem [CAUTION: Non-UBC Email] Well, I don't know about MIXED at the moment, my examples here for a specific dataset run all fine and dandy for GENLINMIXED, https://andrewpwheeler.com/2019/12/01/making-caterpillar-plots-for-random-effects-in-spss/. This is with V26 and no fix packs. With that dataset if I run: MIXED TotalCrime BY FishID WITH TotalLic CFS /FIXED TotalLic CFS /RANDOM = FishID /SAVE FIXPRED(FixLin) PRED(FullPred) SEFIXP(SeFix) SEPRED(SeFull). It takes about 20 seconds and converges. But if I run with the solution command it just hangs for several minutes. MIXED TotalCrime BY FishID WITH TotalLic CFS /FIXED TotalLic CFS /RANDOM = FishID | SOLUTION. And I get impatient at that point and kill SPSS. Again GENLINMIXED for a pretty much equivalent model runs just fine and dandy: GENLINMIXED /FIELDS TARGET=TotalCrime /TARGET_OPTIONS DISTRIBUTION=NORMAL /FIXED EFFECTS=TotalLic CFS /RANDOM USE_INTERCEPT=TRUE SUBJECTS=FishID SOLUTION = TRUE. So while I can't replicate the exact behavior of the OP, it appears something strange is going on under the hood when including the SOLUTION argument for RANDOM effects in MIXED. ----- Andy W [hidden email] http://andrewpwheeler.wordpress.com/ -- Sent from: http://spssx-discussion.1045642.n5.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 think this is it:
GENLINMIXED /FIELDS TARGET=vppE_1 /TARGET_OPTIONS DISTRIBUTION=NORMAL /FIXED EFFECTS=Time /RANDOM EFFECTS=Time USE_INTERCEPT=TRUE SUBJECTS=SubID COVARIANCE_TYPE=UNSTRUCTURED SOLUTION = TRUE. Caveat Emptor, I am not 100% sure about replicating the covariance between the random effects compared to your original MIXED command. It appears in the docs no covariance is the default for GENLINMIXED, (so maybe that is a source of our troubles for MIXED?). I wouldn't think that would cause the issue with solution, but maybe SOLUTION on MIXED is printing the whole variance/covariance matrix (which in my example would be a 400*400 some matrix), whereas GENLINMIXED is only providing the BLUPs in that command. (One thing I remember looking before, even when saving a model file for these models, it does not stuff that info in the model file.) ----- Andy W [hidden email] http://andrewpwheeler.wordpress.com/ -- Sent from: http://spssx-discussion.1045642.n5.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 |
Re: mixed. No, I don't think that is the problem. I kind of remember using solution with mixed and getting crazy output that didn't make sense. This was probably with 25 (but maybe it's fixed in 27) and I don't know that I have tried since.
PS. I wonder who ibm bought the genlinmixed code from because it's so different from other spss procedures. Gene Maguin -----Original Message----- From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Andy W Sent: Wednesday, February 24, 2021 8:40 AM To: [hidden email] Subject: Re: strange individual slope problem I think this is it: GENLINMIXED /FIELDS TARGET=vppE_1 /TARGET_OPTIONS DISTRIBUTION=NORMAL /FIXED EFFECTS=Time /RANDOM EFFECTS=Time USE_INTERCEPT=TRUE SUBJECTS=SubID COVARIANCE_TYPE=UNSTRUCTURED SOLUTION = TRUE. Caveat Emptor, I am not 100% sure about replicating the covariance between the random effects compared to your original MIXED command. It appears in the docs no covariance is the default for GENLINMIXED, (so maybe that is a source of our troubles for MIXED?). I wouldn't think that would cause the issue with solution, but maybe SOLUTION on MIXED is printing the whole variance/covariance matrix (which in my example would be a 400*400 some matrix), whereas GENLINMIXED is only providing the BLUPs in that command. (One thing I remember looking before, even when saving a model file for these models, it does not stuff that info in the model file.) ----- Andy W [hidden email] http://andrewpwheeler.wordpress.com/ -- Sent from: http://spssx-discussion.1045642.n5.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 |
GENLINMIXED was introduced in Statistics version 19 and enhanced in V20, 22, and 25. It was created entirely by the SPSS team. On Wed, Feb 24, 2021 at 7:29 AM Maguin, Eugene <[hidden email]> wrote: Re: mixed. No, I don't think that is the problem. I kind of remember using solution with mixed and getting crazy output that didn't make sense. This was probably with 25 (but maybe it's fixed in 27) and I don't know that I have tried since. |
Free forum by Nabble | Edit this page |