GenLinMixed question

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

GenLinMixed question

torvon
Hello.

I'm trying to run a repeated measurement GenLinMixed with an ordered outcome variable. Reading through the SPSS 20 User's Guide, there is no reason to assume that this shouldn't work.

However, I get the error message "Repeated measurement analysis is not supported for the multinomial probability distribution", which is the one SPSS chooses by default for an ordinal variable. The others are Binary logistic and probit, and interval censored survival, which are not appropriate for ordered variables.

I'd appreciate if you have input on this.
Thanks
E
Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Alex Reutter
I'm afraid that the error message is correct, and you can't fit a residual R matrix when there is a nominal or ordinal target.

Note that it is still possible to model data for which you have multiple measurements for each subject (for example, see: http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm); however, it's done by modeling them through random effects.

Alex




From:        torvon <[hidden email]>
To:        [hidden email],
Date:        09/13/2012 11:22 AM
Subject:        GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hello.

I'm trying to run a repeated measurement GenLinMixed with an ordered outcome
variable. Reading through the SPSS 20 User's Guide, there is no reason to
assume that this shouldn't work.

However, I get the error message "Repeated measurement analysis is not
supported for the multinomial probability distribution", which is the one
SPSS chooses by default for an ordinal variable. The others are Binary
logistic and probit, and interval censored survival, which are not
appropriate for ordered variables.

I'd appreciate if you have input on this.
Thanks
E

Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

torvon
Alex, 

Thank you for the link. I read through the link you provided carefully, but this example is a cross-sectional model, and I'm interested in multinomial models with several measurement points. 

Therefor I don't quite understand what you mean with "Note that it is still possible to model data for which you have multiple measurements for each subject [...] by modeling them through random effects." 

Thank you for the input

Eiko

On 13 September 2012 16:10, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
I'm afraid that the error message is correct, and you can't fit a residual R matrix when there is a nominal or ordinal target.

Note that it is still possible to model data for which you have multiple measurements for each subject (for example, see: http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm); however, it's done by modeling them through random effects.

Alex




From:        torvon <[hidden email]>
To:        [hidden email],
Date:        09/13/2012 11:22 AM
Subject:        GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hello.

I'm trying to run a repeated measurement GenLinMixed with an ordered outcome
variable. Reading through the SPSS 20 User's Guide, there is no reason to
assume that this shouldn't work.

However, I get the error message "Repeated measurement analysis is not
supported for the multinomial probability distribution", which is the one
SPSS chooses by default for an ordinal variable. The others are Binary
logistic and probit, and interval censored survival, which are not
appropriate for ordered variables.

I'd appreciate if you have input on this.
Thanks
E




If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715080.html
To unsubscribe from GenLinMixed question, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Alex Reutter
How about a random coefficients model?  This was written for the MIXED procedure, but could be adapted for GENLINMIXED: http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm

Alex




From:        torvon <[hidden email]>
To:        [hidden email],
Date:        09/13/2012 03:58 PM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Alex, 

Thank you for the link. I read through the link you provided carefully, but this example is a cross-sectional model, and I'm interested in multinomial models with several measurement points. 

Therefor I don't quite understand what you mean with "Note that it is still possible to model data for which you have multiple measurements for each subject [...] by modeling them through random effects." 

Thank you for the input

Eiko

On 13 September 2012 16:10, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
I'm afraid that the error message is correct, and you can't fit a residual R matrix when there is a nominal or ordinal target.

Note that it is still possible to model data for which you have multiple measurements for each subject (for example, see:
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm); however, it's done by modeling them through random effects.

Alex





From:        
torvon <[hidden email]>
To:        
[hidden email],
Date:        
09/13/2012 11:22 AM
Subject:        
GenLinMixed question
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>




Hello.

I'm trying to run a repeated measurement GenLinMixed with an ordered outcome
variable. Reading through the SPSS 20 User's Guide, there is no reason to
assume that this shouldn't work.

However, I get the error message "Repeated measurement analysis is not
supported for the multinomial probability distribution", which is the one
SPSS chooses by default for an ordinal variable. The others are Binary
logistic and probit, and interval censored survival, which are not
appropriate for ordered variables.

I'd appreciate if you have input on this.
Thanks
E


Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Maguin, Eugene

Alex, I’m curious about this element of your recommendation. Mplus fits the growth curve model to the polychoric correlation matrix estimated from the marginal distributions of the model variables. I’ve never used GenLinMixed, so I know nothing about it, but extrapolating from Nomreg, isn’t the regression result from GenLinMixed going to show the probabilities of transition, I think might be the way to say it?

 

Thanks, Gene Maguin

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Alex Reutter
Sent: Friday, September 14, 2012 10:35 AM
To: [hidden email]
Subject: Re: GenLinMixed question

 

How about a random coefficients model?  This was written for the MIXED procedure, but could be adapted for GENLINMIXED: http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm

Alex




From:        torvon <[hidden email]>
To:        [hidden email],
Date:        09/13/2012 03:58 PM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





Alex, 

Thank you for the link. I read through the link you provided carefully, but this example is a cross-sectional model, and I'm interested in multinomial models with several measurement points. 

Therefor I don't quite understand what you mean with "Note that it is still possible to model data for which you have multiple measurements for each subject [...] by modeling them through random effects." 

Thank you for the input

Eiko

On 13 September 2012 16:10, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
I'm afraid that the error message is correct, and you can't fit a residual R matrix when there is a nominal or ordinal target.

Note that it is still possible to model data for which you have multiple measurements for each subject (for example, see:
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm); however, it's done by modeling them through random effects.

Alex





From:        
torvon <[hidden email]>
To:        
[hidden email],
Date:        
09/13/2012 11:22 AM

Subject:        
GenLinMixed question
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>





Hello.

I'm trying to run a repeated measurement GenLinMixed with an ordered outcome
variable. Reading through the SPSS 20 User's Guide, there is no reason to
assume that this shouldn't work.

However, I get the error message "Repeated measurement analysis is not
supported for the multinomial probability distribution", which is the one
SPSS chooses by default for an ordinal variable. The others are Binary
logistic and probit, and interval censored survival, which are not
appropriate for ordered variables.

I'd appreciate if you have input on this.
Thanks
E

Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

torvon
In reply to this post by Alex Reutter
Alex,

Thank you. I am not 100% sure how to incorporate time as a random effect in GENLINMIXED, because the syntax is different from /MIXED.

Is this correct?

GENLINMIXED
/DATA_STRUCTURE SUBJECTS=UserID
/FIELDS TARGET= y
/TARGET_OPTIONS DISTRIBUTION=MULTINOMIAL LINK=LOGIT
/FIXED  EFFECTS=time a b c USE_INTERCEPT=TRUE
/RANDOM EFFECTS=time USE_INTERCEPT=TRUE SUBJECTS=UserID COVARIANCE_TYPE=UNSTRUCTURED 

Is it corrected that I can set up an autoregressive cov structure (AR1) in this random coefficients model in the same way I can set up an AR1 model using repeated models, by using AR1 as cov type in the random effects instead of the /repeated command?

Is this computationally demanding? It's been 25 minutes since I started the model in SPSS (N=1700, 5 measurement points, I guess "unstructured" is dangerous...). 

Thanks
Eiko



On 14 September 2012 10:43, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
How about a random coefficients model?  This was written for the MIXED procedure, but could be adapted for GENLINMIXED: http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm

Alex




From:        torvon <[hidden email]>
To:        [hidden email],
Date:        09/13/2012 03:58 PM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Alex, 

Thank you for the link. I read through the link you provided carefully, but this example is a cross-sectional model, and I'm interested in multinomial models with several measurement points. 

Therefor I don't quite understand what you mean with "Note that it is still possible to model data for which you have multiple measurements for each subject [...] by modeling them through random effects." 

Thank you for the input

Eiko

On 13 September 2012 16:10, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
I'm afraid that the error message is correct, and you can't fit a residual R matrix when there is a nominal or ordinal target.

Note that it is still possible to model data for which you have multiple measurements for each subject (for example, see:
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm); however, it's done by modeling them through random effects.

Alex





From:        
torvon <[hidden email]>
To:        
[hidden email],
Date:        
09/13/2012 11:22 AM
Subject:        
GenLinMixed question
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>




Hello.

I'm trying to run a repeated measurement GenLinMixed with an ordered outcome
variable. Reading through the SPSS 20 User's Guide, there is no reason to
assume that this shouldn't work.

However, I get the error message "Repeated measurement analysis is not
supported for the multinomial probability distribution", which is the one
SPSS chooses by default for an ordinal variable. The others are Binary
logistic and probit, and interval censored survival, which are not
appropriate for ordered variables.

I'd appreciate if you have input on this.
Thanks
E





If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715087.html
To unsubscribe from GenLinMixed question, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Alex Reutter
In reply to this post by Maguin, Eugene
Hi Gene,

If I understand the question correctly, then no, it's not modeling the transition probabilities.  You might be able to derive something that would be usable as transition probabilities from the regression coefficients, but I haven't looked closely at it.

Alex
 



From:        "Maguin, Eugene" <[hidden email]>
To:        [hidden email],
Date:        09/14/2012 11:11 AM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Alex, I’m curious about this element of your recommendation. Mplus fits the growth curve model to the polychoric correlation matrix estimated from the marginal distributions of the model variables. I’ve never used GenLinMixed, so I know nothing about it, but extrapolating from Nomreg, isn’t the regression result from GenLinMixed going to show the probabilities of transition, I think might be the way to say it?
 
Thanks, Gene Maguin
 
From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Alex Reutter
Sent:
Friday, September 14, 2012 10:35 AM
To:
[hidden email]
Subject:
Re: GenLinMixed question

 
How about a random coefficients model?  This was written for the MIXED procedure, but could be adapted for GENLINMIXED: http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm

Alex





From:        
torvon <torvon@...>
To:        
[hidden email],
Date:        
09/13/2012 03:58 PM
Subject:        
Re: GenLinMixed question
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>





Alex,  

Thank you for the link. I read through the link you provided carefully, but this example is a cross-sectional model, and I'm interested in multinomial models with several measurement points.  

Therefor I don't quite understand what you mean with "Note that it is still possible to model data for which you have multiple measurements for each subject [...] by modeling them through random effects."  

Thank you for the input

Eiko

On 13 September 2012 16:10, Alex Reutter [via SPSSX Discussion] <
[hidden email]> wrote:
I'm afraid that the error message is correct, and you can't fit a residual R matrix when there is a nominal or ordinal target.


Note that it is still possible to model data for which you have multiple measurements for each subject (for example, see:
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm); however, it's done by modeling them through random effects.

Alex





From: Â  Â  Â  Â
torvon <[hidden email]>
To: Â  Â  Â  Â
[hidden email],
Date: Â  Â  Â  Â
09/13/2012 11:22 AM
Subject: Â  Â  Â  Â
GenLinMixed question
Sent by: Â  Â  Â  Â
"SPSSX(r) Discussion" <[hidden email]>





Hello.

I'm trying to run a repeated measurement GenLinMixed with an ordered outcome
variable. Reading through the SPSS 20 User's Guide, there is no reason to
assume that this shouldn't work.

However, I get the error message "Repeated measurement analysis is not
supported for the multinomial probability distribution", which is the one
SPSS chooses by default for an ordinal variable. The others are Binary
logistic and probit, and interval censored survival, which are not
appropriate for ordered variables.

I'd appreciate if you have input on this.
Thanks
E

Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Alex Reutter
In reply to this post by torvon
Hi Eiko,

I'm used to using time as a continuous input (covariate) in random coefficients models, and then using polynomial terms (time^2, time^3) as needed.  Using it as a categorical input (factor) might be fine, but in that case I think you'll want to not use the intercept on the random effect, and expect "unstructured" to run a while.  AR1 would almost certainly be faster, though running unstructured is always useful for comparison.

Alex




From:        torvon <[hidden email]>
To:        [hidden email],
Date:        09/14/2012 03:46 PM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Alex,

Thank you. I am not 100% sure how to incorporate time as a random effect in GENLINMIXED, because the syntax is different from /MIXED.

Is this correct?

GENLINMIXED
/DATA_STRUCTURE SUBJECTS=UserID
/FIELDS TARGET= y
/TARGET_OPTIONS DISTRIBUTION=MULTINOMIAL LINK=LOGIT
/FIXED  EFFECTS=time a b c USE_INTERCEPT=TRUE
/RANDOM EFFECTS=time USE_INTERCEPT=TRUE SUBJECTS=UserID COVARIANCE_TYPE=UNSTRUCTURED 

Is it corrected that I can set up an autoregressive cov structure (AR1) in this random coefficients model in the same way I can set up an AR1 model using repeated models, by using AR1 as cov type in the random effects instead of the /repeated command?

Is this computationally demanding? It's been 25 minutes since I started the model in SPSS (N=1700, 5 measurement points, I guess "unstructured" is dangerous...). 

Thanks
Eiko



On 14 September 2012 10:43, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
How about a random coefficients model?  This was written for the MIXED procedure, but could be adapted for GENLINMIXED: http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm

Alex





From:        
torvon <[hidden email]>
To:        
[hidden email],
Date:        09/13/2012 03:58 PM
Subject:        
Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Alex, 

Thank you for the link. I read through the link you provided carefully, but this example is a cross-sectional model, and I'm interested in multinomial models with several measurement points. 

Therefor I don't quite understand what you mean with "Note that it is still possible to model data for which you have multiple measurements for each subject [...] by modeling them through random effects." 


Thank you for the input

Eiko

On 13 September 2012 16:10, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
I'm afraid that the error message is correct, and you can't fit a residual R matrix when there is a nominal or ordinal target.


Note that it is still possible to model data for which you have multiple measurements for each subject (for example, see:
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm); however, it's done by modeling them through random effects.

Alex





From:        
torvon <[hidden email]>
To:        
[hidden email],
Date:        
09/13/2012 11:22 AM
Subject:        
GenLinMixed question
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>




Hello.

I'm trying to run a repeated measurement GenLinMixed with an ordered outcome
variable. Reading through the SPSS 20 User's Guide, there is no reason to
assume that this shouldn't work.

However, I get the error message "Repeated measurement analysis is not
supported for the multinomial probability distribution", which is the one
SPSS chooses by default for an ordinal variable. The others are Binary
logistic and probit, and interval censored survival, which are not
appropriate for ordered variables.

I'd appreciate if you have input on this.
Thanks
E






If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715087.html
To unsubscribe from GenLinMixed question, click here.
NAML



View this message in context: Re: GenLinMixed question
Sent from the
SPSSX Discussion mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Automatic reply: GenLinMixed question

Jo Fennessey

I will be out of the office until Monday September 24, but will check email often. If you need to reach me, please call my cell phone: 410-258-4623.

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Zuluaga, Juan
In reply to this post by torvon
A problem with such approaches is that coefficients are very hard to interpret.

Perhaps you could be interested in TraMineR ("a toolbox for exploring sequence data" ).
http://mephisto.unige.ch/traminer/

Other than that, I would try Hedeker's stuff:

http://tigger.uic.edu/~hedeker/ml.html (no SPSS code but SAS code, and there may be good reasons why).
http://tigger.uic.edu/~hedeker/mix.html



"I'm trying to run a repeated measurement
GenLinMixed with an ordered outcome variable."



Juan Zuluaga  (jzuluaga - stcloudstate.edu)
Research Analyst at the Office of Precollege Programs,
St. Cloud State University.

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

torvon
In reply to this post by Alex Reutter
Alex, 

Thank you! One last question: time must be specified as continuous, not categorical. However, I don't find a way to specify time as continuous covariate, like you mention it. 

In GENLINMIXED syntax, there is no differentiation between factors and continuous covariates, as far as I can see. This is different from MIXED in which factors are denominated by BY and covariates by WITH. 

This is the same if one uses the menu, in MIXED there are two fields, one for factors and one for covariates, in GENLINMIXED they all go into the same box. 

So SPSS knows automatically what is what by looking at the way the variables are defined? 
Thanks
Eiko


On 18 September 2012 10:24, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
Hi Eiko,

I'm used to using time as a continuous input (covariate) in random coefficients models, and then using polynomial terms (time^2, time^3) as needed.  Using it as a categorical input (factor) might be fine, but in that case I think you'll want to not use the intercept on the random effect, and expect "unstructured" to run a while.  AR1 would almost certainly be faster, though running unstructured is always useful for comparison.

Alex




From:        torvon <[hidden email]>
To:        [hidden email],
Date:        09/14/2012 03:46 PM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Alex,

Thank you. I am not 100% sure how to incorporate time as a random effect in GENLINMIXED, because the syntax is different from /MIXED.

Is this correct?

GENLINMIXED
/DATA_STRUCTURE SUBJECTS=UserID
/FIELDS TARGET= y
/TARGET_OPTIONS DISTRIBUTION=MULTINOMIAL LINK=LOGIT
/FIXED  EFFECTS=time a b c USE_INTERCEPT=TRUE
/RANDOM EFFECTS=time USE_INTERCEPT=TRUE SUBJECTS=UserID COVARIANCE_TYPE=UNSTRUCTURED 

Is it corrected that I can set up an autoregressive cov structure (AR1) in this random coefficients model in the same way I can set up an AR1 model using repeated models, by using AR1 as cov type in the random effects instead of the /repeated command?

Is this computationally demanding? It's been 25 minutes since I started the model in SPSS (N=1700, 5 measurement points, I guess "unstructured" is dangerous...). 

Thanks
Eiko



On 14 September 2012 10:43, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
How about a random coefficients model?  This was written for the MIXED procedure, but could be adapted for GENLINMIXED: http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm

Alex





From:        
torvon <[hidden email]>
To:        
[hidden email],
Date:        09/13/2012 03:58 PM
Subject:        
Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Alex, 

Thank you for the link. I read through the link you provided carefully, but this example is a cross-sectional model, and I'm interested in multinomial models with several measurement points. 

Therefor I don't quite understand what you mean with "Note that it is still possible to model data for which you have multiple measurements for each subject [...] by modeling them through random effects." 


Thank you for the input

Eiko

On 13 September 2012 16:10, Alex Reutter [via SPSSX Discussion] <[hidden email]> wrote:
I'm afraid that the error message is correct, and you can't fit a residual R matrix when there is a nominal or ordinal target.


Note that it is still possible to model data for which you have multiple measurements for each subject (for example, see:
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm); however, it's done by modeling them through random effects.

Alex





From:        
torvon <[hidden email]>
To:        
[hidden email],
Date:        
09/13/2012 11:22 AM
Subject:        
GenLinMixed question
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>




Hello.

I'm trying to run a repeated measurement GenLinMixed with an ordered outcome
variable. Reading through the SPSS 20 User's Guide, there is no reason to
assume that this shouldn't work.

However, I get the error message "Repeated measurement analysis is not
supported for the multinomial probability distribution", which is the one
SPSS chooses by default for an ordinal variable. The others are Binary
logistic and probit, and interval censored survival, which are not
appropriate for ordered variables.

I'd appreciate if you have input on this.
Thanks
E






If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715087.html
To unsubscribe from GenLinMixed question, click here.
NAML



View this message in context: Re: GenLinMixed question
Sent from the
SPSSX Discussion mailing list archive at Nabble.com.



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715146.html
To unsubscribe from GenLinMixed question, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Bruce Weaver
Administrator
Here is an example from the FM.

GENLINMIXED
 /FIELDS TARGET=y
 /TARGET_OPTIONS DISTRIBUTION=NORMAL LINK=IDENTITY
 /FIXED EFFECTS=x1 x2 x3.

- The FIELDS subcommand specifies y as the target.
- The TARGET_OPTIONS subcommand that the target has a normal distribution and is linearly related to the model effects.
- The FIXED subcommand specifies a main effects model with fields x1 , x2 ,and x3. If they are continuous, they will be treated as covariates, if categorical, they will be treated as factors.

I *suspect* that GENLINMIXED uses the VARIABLE LEVEL information to determine whether x1 x2 and x3 are continuous (VARIABLE LEVEL = scale) or not (VL = nominal or ordinal).  

Personally, I prefer the old BY categorical WITH continuous variable approach.  That way, if someone has neglected to set variable levels, they'll still get the right model.



torvon wrote
Alex,

Thank you! One last question: time must be specified as continuous, not
categorical. However, I don't find a way to specify time as continuous
covariate, like you mention it.

In GENLINMIXED syntax, there is no differentiation between factors and
continuous covariates, as far as I can see. This is different from MIXED in
which factors are denominated by BY and covariates by WITH.

This is the same if one uses the menu, in MIXED there are two fields, one
for factors and one for covariates, in GENLINMIXED they all go into the
same box.

So SPSS knows automatically what is what by looking at the way the
variables are defined?
Thanks
Eiko


On 18 September 2012 10:24, Alex Reutter [via SPSSX Discussion] <
[hidden email]> wrote:

> Hi Eiko,
>
> I'm used to using time as a continuous input (covariate) in random
> coefficients models, and then using polynomial terms (time^2, time^3) as
> needed.  Using it as a categorical input (factor) might be fine, but in
> that case I think you'll want to not use the intercept on the random
> effect, and expect "unstructured" to run a while.  AR1 would almost
> certainly be faster, though running unstructured is always useful for
> comparison.
>
> Alex
>
>
>
>
> From:        torvon <[hidden email]<http://user/SendEmail.jtp?type=node&node=5715146&i=0>
> >
> To:        [hidden email]<http://user/SendEmail.jtp?type=node&node=5715146&i=1>,
>
> Date:        09/14/2012 03:46 PM
> Subject:        Re: GenLinMixed question
> Sent by:        "SPSSX(r) Discussion" <[hidden email]<http://user/SendEmail.jtp?type=node&node=5715146&i=2>
> >
> ------------------------------
>
>
>
> Alex,
>
> Thank you. I am not 100% sure how to incorporate time as a random effect
> in GENLINMIXED, because the syntax is different from /MIXED.
>
> Is this correct?
>
> GENLINMIXED
> /DATA_STRUCTURE SUBJECTS=UserID
> /FIELDS TARGET= y
> /TARGET_OPTIONS DISTRIBUTION=MULTINOMIAL LINK=LOGIT
> /FIXED Â EFFECTS=time a b c USE_INTERCEPT=TRUE
> /RANDOM EFFECTS=time USE_INTERCEPT=TRUE SUBJECTS=UserID
> COVARIANCE_TYPE=UNSTRUCTUREDÂ
>
> Is it corrected that I can set up an autoregressive cov structure
> (AR1) in this random coefficients model in the same way I can set up an
> AR1 model using repeated models, by using AR1 as cov type in the random
> effects instead of the /repeated command?
>
> Is this computationally demanding? It's been 25 minutes since I started
> the model in SPSS (N=1700, 5 measurement points, I guess "unstructured" is
> dangerous...).Â
>
> Thanks
> Eiko
>
>
>
> On 14 September 2012 10:43, Alex Reutter [via SPSSX Discussion] <*[hidden
> email]* <http://user/SendEmail.jtp?type=node&node=5715096&i=0>> wrote:
> How about a random coefficients model? Â This was written for the MIXED
> procedure, but could be adapted for GENLINMIXED: *
> http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm
> *<http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm>
>
> Alex
>
>
>
>
> From: Â  Â  Â  Â torvon <*[hidden email]*<http://user/SendEmail.jtp?type=node&node=5715087&i=0>
> >
> To: Â  Â  Â  Â *[hidden email]*<http://user/SendEmail.jtp?type=node&node=5715087&i=1>,
>
> Date: Â  Â  Â  Â 09/13/2012 03:58 PM
> Subject: Â  Â  Â  Â Re: GenLinMixed question
> Sent by: Â  Â  Â  Â "SPSSX(r) Discussion" <*[hidden email]*<http://user/SendEmail.jtp?type=node&node=5715087&i=2>
> >
>  ------------------------------
>
>
>
> Alex,ÂÂ
>
> Thank you for the link. I read through the link you provided carefully,
> but this example is a cross-sectional model, and I'm interested in
> multinomial models with several measurement points.ÂÂ
>
> Therefor I don't quite understand what you mean with "Note that it is
> still possible to model data for which you have multiple measurements for
> each subject [...] by modeling them through random effects."ÂÂ
>
> Thank you for the input
>
> Eiko
>
> On 13 September 2012 16:10, Alex Reutter [via SPSSX Discussion] <*[hidden
> email]* <http://user/SendEmail.jtp?type=node&node=5715081&i=0>> wrote:
> I'm afraid that the error message is correct, and you can't fit a residual
> R matrix when there is a nominal or ordinal target.
>
> Note that it is still possible to model data for which you have multiple
> measurements for each subject (for example, see: *
> http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm
> *<http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm>);
> however, it's done by modeling them through random effects.
>
> Alex
>
>
>
>
> From:   Ã‚  Ã‚  Ã‚ torvon <*[hidden email]*<http://user/SendEmail.jtp?type=node&node=5715080&i=0>
> >
> To:   Ã‚  Ã‚  Ã‚ *[hidden email]*<http://user/SendEmail.jtp?type=node&node=5715080&i=1>,
>
> Date:   Ã‚  Ã‚  Ã‚ 09/13/2012 11:22 AM
> Subject:   Ã‚  Ã‚  Ã‚ GenLinMixed question
> Sent by:   Ã‚  Ã‚  Ã‚ "SPSSX(r) Discussion" <*[hidden email]*<http://user/SendEmail.jtp?type=node&node=5715080&i=2>
> >
> ------------------------------
>
>
>
> Hello.
>
> I'm trying to run a repeated measurement GenLinMixed with an ordered
> outcome
> variable. Reading through the SPSS 20 User's Guide, there is no reason to
> assume that this shouldn't work.
>
> However, I get the error message "Repeated measurement analysis is not
> supported for the multinomial probability distribution", which is the one
> SPSS chooses by default for an ordinal variable. The others are Binary
> logistic and probit, and interval censored survival, which are not
> appropriate for ordered variables.
>
> I'd appreciate if you have input on this.
> Thanks
> E
>
>
>
>  ------------------------------
>
> *If you reply to this email, your message will be added to the discussion
> below:*
> *
> http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715087.html
> *<http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715087.html>
> To unsubscribe from GenLinMixed question, *click here*.*
> **NAML*<http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>  ------------------------------
> View this message in context: *Re: GenLinMixed question*<http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715096.html>
> Sent from the *SPSSX Discussion mailing list archive*<http://spssx-discussion.1045642.n5.nabble.com/>at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715146.html
>  To unsubscribe from GenLinMixed question, click here<http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5715073&code=dG9ydm9uQGdtYWlsLmNvbXw1NzE1MDczfC0xMzkzMzg5ODEx>
> .
> NAML<http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
Bruce Weaver
bweaver@lakeheadu.ca
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.
Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

torvon
Bruce, 

Personally, I prefer the old BY categorical WITH continuous variable approach.  That way, if someone has neglected to set variable levels, they'll still get the right model.

I don't understand what you mean with BY and WITH, since these options are not available for GENLINMIXED. Are you saying you wish SPSS implemented that?

Doesn't say anywhere whether I have to dummy code my categorical variables for GENLINMIXED or whether SPSS detects the variables correctly. Sometimes SPSS is so annoying. 

Eiko 
Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Jon K Peck
In reply to this post by Bruce Weaver
From the CSR:

To include a term for the main effect of a factor (categorical predictor) or covariate (continuous
predictor), enter its field name. Whether a field is treated as a factor or covariate depends
upon its measurement level. Fields with categorical (flag, nominal, or ordinal) measurement
level are treated as factors while fields with continuous (scale) measurement level are treated
as covariates.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Bruce Weaver <[hidden email]>
To:        [hidden email]
Date:        09/20/2012 08:58 AM
Subject:        Re: [SPSSX-L] GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Here is an example from the FM.

GENLINMIXED
/FIELDS TARGET=y
/TARGET_OPTIONS DISTRIBUTION=NORMAL LINK=IDENTITY
/FIXED EFFECTS=x1 x2 x3.

- The FIELDS subcommand specifies y as the target.
- The TARGET_OPTIONS subcommand that the target has a normal distribution
and is linearly related to the model effects.
- The FIXED subcommand specifies a main effects model with fields x1 , x2
,and x3. If they are continuous, they will be treated as covariates, if
categorical, they will be treated as factors.

I *suspect* that GENLINMIXED uses the VARIABLE LEVEL information to
determine whether x1 x2 and x3 are continuous (VARIABLE LEVEL = scale) or
not (VL = nominal or ordinal).

Personally, I prefer the old BY categorical WITH continuous variable
approach.  That way, if someone has neglected to set variable levels,
they'll still get the right model.




torvon wrote
> Alex,
>
> Thank you! One last question: time must be specified as continuous, not
> categorical. However, I don't find a way to specify time as continuous
> covariate, like you mention it.
>
> In GENLINMIXED syntax, there is no differentiation between factors and
> continuous covariates, as far as I can see. This is different from MIXED
> in
> which factors are denominated by BY and covariates by WITH.
>
> This is the same if one uses the menu, in MIXED there are two fields, one
> for factors and one for covariates, in GENLINMIXED they all go into the
> same box.
>
> So SPSS knows automatically what is what by looking at the way the
> variables are defined?
> Thanks
> Eiko
>
>
> On 18 September 2012 10:24, Alex Reutter [via SPSSX Discussion] <

> ml-node+s1045642n5715146h39@.nabble

>> wrote:
>
>> Hi Eiko,
>>
>> I'm used to using time as a continuous input (covariate) in random
>> coefficients models, and then using polynomial terms (time^2, time^3) as
>> needed.  Using it as a categorical input (factor) might be fine, but in
>> that case I think you'll want to not use the intercept on the random
>> effect, and expect "unstructured" to run a while.  AR1 would almost
>> certainly be faster, though running unstructured is always useful for
>> comparison.
>>
>> Alex
>>
>>
>>
>>
>> From:        torvon <[hidden
>> email]&lt;
http://user/SendEmail.jtp?type=node&amp;node=5715146&amp;i=0&gt;
>> >
>> To:        [hidden
>> email]&lt;
http://user/SendEmail.jtp?type=node&amp;node=5715146&amp;i=1&gt;,
>>
>> Date:        09/14/2012 03:46 PM
>> Subject:        Re: GenLinMixed question
>> Sent by:        "SPSSX(r) Discussion" <[hidden
>> email]&lt;
http://user/SendEmail.jtp?type=node&amp;node=5715146&amp;i=2&gt;
>> >
>> ------------------------------
>>
>>
>>
>> Alex,
>>
>> Thank you. I am not 100% sure how to incorporate time as a random effect
>> in GENLINMIXED, because the syntax is different from /MIXED.
>>
>> Is this correct?
>>
>> GENLINMIXED
>> /DATA_STRUCTURE SUBJECTS=UserID
>> /FIELDS TARGET= y
>> /TARGET_OPTIONS DISTRIBUTION=MULTINOMIAL LINK=LOGIT
>> /FIXED Â EFFECTS=time a b c USE_INTERCEPT=TRUE
>> /RANDOM EFFECTS=time USE_INTERCEPT=TRUE SUBJECTS=UserID
>> COVARIANCE_TYPE=UNSTRUCTUREDÂ
>>
>> Is it corrected that I can set up an autoregressive cov structure
>> (AR1) in this random coefficients model in the same way I can set up an
>> AR1 model using repeated models, by using AR1 as cov type in the random
>> effects instead of the /repeated command?
>>
>> Is this computationally demanding? It's been 25 minutes since I started
>> the model in SPSS (N=1700, 5 measurement points, I guess "unstructured"
>> is
>> dangerous...).Â
>>
>> Thanks
>> Eiko
>>
>>
>>
>> On 14 September 2012 10:43, Alex Reutter [via SPSSX Discussion] <*[hidden
>> email]*
>> &lt;
http://user/SendEmail.jtp?type=node&amp;node=5715096&amp;i=0&gt;>
>> wrote:
>> How about a random coefficients model? Â This was written for the MIXED
>> procedure, but could be adapted for GENLINMIXED: *
>>
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm
>> *&lt;
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_diet_intro_03.htm&gt;
>>
>> Alex
>>
>>
>>
>>
>> From: Â  Â  Â  Â torvon <*[hidden
>> email]*&lt;
http://user/SendEmail.jtp?type=node&amp;node=5715087&amp;i=0&gt;
>> >
>> To: Â  Â  Â  Â *[hidden
>> email]*&lt;
http://user/SendEmail.jtp?type=node&amp;node=5715087&amp;i=1&gt;,
>>
>> Date: Â  Â  Â  Â 09/13/2012 03:58 PM
>> Subject: Â  Â  Â  Â Re: GenLinMixed question
>> Sent by: Â  Â  Â  Â "SPSSX(r) Discussion" <*[hidden
>> email]*&lt;
http://user/SendEmail.jtp?type=node&amp;node=5715087&amp;i=2&gt;
>> >
>>  ------------------------------
>>
>>
>>
>> Alex,ÂÂ
>>
>> Thank you for the link. I read through the link you provided carefully,
>> but this example is a cross-sectional model, and I'm interested in
>> multinomial models with several measurement points.ÂÂ
>>
>> Therefor I don't quite understand what you mean with "Note that it is
>> still possible to model data for which you have multiple measurements for
>> each subject [...] by modeling them through random effects."ÂÂ
>>
>> Thank you for the input
>>
>> Eiko
>>
>> On 13 September 2012 16:10, Alex Reutter [via SPSSX Discussion] <*[hidden
>> email]*
>> &lt;
http://user/SendEmail.jtp?type=node&amp;node=5715081&amp;i=0&gt;>
>> wrote:
>> I'm afraid that the error message is correct, and you can't fit a
>> residual
>> R matrix when there is a nominal or ordinal target.
>>
>> Note that it is still possible to model data for which you have multiple
>> measurements for each subject (for example, see: *
>>
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm
>> *&lt;
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/glmm_cablesurvey_intro.htm&gt;);
>> however, it's done by modeling them through random effects.
>>
>> Alex
>>
>>
>>
>>
>> From:   Ã‚  Ã‚  Ã‚ torvon <*[hidden
>> email]*&lt;
http://user/SendEmail.jtp?type=node&amp;node=5715080&amp;i=0&gt;
>> >
>> To:   Ã‚  Ã‚  Ã‚ *[hidden
>> email]*&lt;
http://user/SendEmail.jtp?type=node&amp;node=5715080&amp;i=1&gt;,
>>
>> Date:   Ã‚  Ã‚  Ã‚ 09/13/2012 11:22 AM
>> Subject:   Ã‚  Ã‚  Ã‚ GenLinMixed question
>> Sent by:   Ã‚  Ã‚  Ã‚ "SPSSX(r) Discussion" <*[hidden
>> email]*&lt;
http://user/SendEmail.jtp?type=node&amp;node=5715080&amp;i=2&gt;
>> >
>> ------------------------------
>>
>>
>>
>> Hello.
>>
>> I'm trying to run a repeated measurement GenLinMixed with an ordered
>> outcome
>> variable. Reading through the SPSS 20 User's Guide, there is no reason to
>> assume that this shouldn't work.
>>
>> However, I get the error message "Repeated measurement analysis is not
>> supported for the multinomial probability distribution", which is the one
>> SPSS chooses by default for an ordinal variable. The others are Binary
>> logistic and probit, and interval censored survival, which are not
>> appropriate for ordered variables.
>>
>> I'd appreciate if you have input on this.
>> Thanks
>> E
>>
>>
>>
>>  ------------------------------
>>
>> *If you reply to this email, your message will be added to the discussion
>> below:*
>> *
>>
http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715087.html
>> *&lt;
http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715087.html&gt;
>> To unsubscribe from GenLinMixed question, *click here*.*
>> **NAML*&lt;
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml&gt;
>>
>>
>>  ------------------------------
>> View this message in context: *Re: GenLinMixed
>> question*&lt;
http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715096.html&gt;
>> Sent from the *SPSSX Discussion mailing list
>> archive*&lt;
http://spssx-discussion.1045642.n5.nabble.com/&gt;at
>> Nabble.com.
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>>
http://spssx-discussion.1045642.n5.nabble.com/GenLinMixed-question-tp5715073p5715146.html
>>  To unsubscribe from GenLinMixed question, click
>> here&lt;
size=2>;
>> .
>> NAML&lt;
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml&gt;
>>





-----
--
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/GenLinMixed-question-tp5715073p5715183.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


Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Bruce Weaver
Administrator
In reply to this post by torvon
I mean that I wish GENLINMIXED did use the same BY-WITH method that is used for GENLIN and a host of other older commands.  I've not played with GENLINMIXED yet, but I see that when I do, I'll have to be sure to have the variable levels set appropriately for all of the explanatory variables (something I didn't have to bother with using GENLIN etc).


torvon wrote
Bruce,

Personally, I prefer the old BY categorical WITH continuous variable
> approach.  That way, if someone has neglected to set variable levels,
> they'll still get the right model.
>

I don't understand what you mean with BY and WITH, since these options are
not available for GENLINMIXED. Are you saying you wish SPSS implemented
that?

Doesn't say anywhere whether I have to dummy code my categorical variables
for GENLINMIXED or whether SPSS detects the variables correctly. Sometimes
SPSS is so annoying.

Eiko
--
Bruce Weaver
bweaver@lakeheadu.ca
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.
Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Alex Reutter
Right, so in GENLIN, you'd have

GENLIN target BY <factor list> WITH <covariate list>
  /MODEL <effect list>.

and you'd swap time from BY to WITH to treat it as a covariate.  In GENLINMIXED, you'd have

GENLINMIXED
  /FIELDS TARGET=target
  /FIXED EFFECT=<effect list>.

and you'd add VARIABLE LEVEL time SCALE. before the GENLINMIXED command to treat is as a covariate.

Having to use VARIABLE LEVEL, I've found I prefer not having to type out all of my variables on BY and WITH, and then again on the MODEL command, especially with a large number of variables, and when I have more than one model to run, and I want to run them first with a variable as a factor and then as a covariate, it's much easier to put a VARIABLE LEVEL command at the head of a bunch of GENLINMIXED commands than to swap the variable between BY and WITH in each of a bunch of GENLIN commands.

Your mileage may vary.

Alex




From:        Bruce Weaver <[hidden email]>
To:        [hidden email],
Date:        09/20/2012 10:19 AM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I mean that I wish GENLINMIXED *did* use the same BY-WITH method that is used
for GENLIN and a host of other older commands.  I've not played with
GENLINMIXED yet, but I see that when I do, I'll have to be sure to have the
variable levels set appropriately for all of the explanatory variables
(something I didn't have to bother with using GENLIN etc).



torvon wrote
> Bruce,
>
> Personally, I prefer the old BY categorical WITH continuous variable
>> approach.  That way, if someone has neglected to set variable levels,
>> they'll still get the right model.
>>
>
> I don't understand what you mean with BY and WITH, since these options are
> not available for GENLINMIXED. Are you saying you wish SPSS implemented
> that?
>
> Doesn't say anywhere whether I have to dummy code my categorical variables
> for GENLINMIXED or whether SPSS detects the variables correctly. Sometimes
> SPSS is so annoying.
>
> Eiko





-----
--
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/GenLinMixed-question-tp5715073p5715186.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


Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Bruce Weaver
Administrator
Hi Alex.  Where one is running a series of models with one or more variables being added at each step (i.e., what one would call hierarchical regression in the context of linear regression), one has to ensure that the same cases are used for all steps.  If you have to run a separate model for each step, as you do for GENLIN and MIXED, you could lose cases (due to missing data) in the later steps.  One way around that is to list ALL of the variables that will be in the final model following BY and WITH at each step.  Here's an example using the cars.sav sample data set.

* Modify path to point to SPSS (English) sample data files.
GET FILE = "C:\SPSSdata\cars.sav".

freq origin.
compute USA = (origin EQ 1).
formats USA(f1).
crosstabs USA by origin.
freq cylinder.
select if any(cylinder,4,6,8).
freq cylinder.

descriptives mpg horse weight cylinder .
* For all variables in full model, listwise valid n = 384.

* Model 1: MPG as only predictor.
* Include only MPG on BY <factors> WITH <covariates> line.
GENLIN USA (REFERENCE=FIRST) WITH mpg
  /MODEL mpg INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model uses n = 390 cases with valid data for USA and MGP.
* Now include all FULL MODEL variables on BY <factors> WITH <covariates> line.

GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse weight
  /MODEL mpg INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model now uses only the n = 384 cases with valid data for all full model variables.

* Model 2:  X = MPG HORSE.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse weight
  /MODEL mpg horse INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model 3:  X = MPG HORSE WEIGHT.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse weight
  /MODEL mpg horse weight INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model 4:  X = MPG HORSE WEIGHT CYLINDER.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse weight
  /MODEL mpg horse weight cylinder INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).


Can GENLINMIXED do that?  Or would one have to first select or flag cases that have valid data for all variables included in the final model?  From what you've said, I'm guessing the latter.  If so, I'd have to do something like the following if I was using GENLINMIXED for the example shown above:

* Flag cases that have all variables needed for the full model.
COMPUTE GoodCase = nmiss(USA,MPG,HORSE,WEIGHT,CYLINDER) EQ 0.
FILTER BY GoodCase.
* Series of GENLINMIXED commands here.
USE ALL.
FILTER OFF.



Alex Reutter wrote
Right, so in GENLIN, you'd have

GENLIN target BY <factor list> WITH <covariate list>
  /MODEL <effect list>.

and you'd swap time from BY to WITH to treat it as a covariate.  In
GENLINMIXED, you'd have

GENLINMIXED
  /FIELDS TARGET=target
  /FIXED EFFECT=<effect list>.

and you'd add VARIABLE LEVEL time SCALE. before the GENLINMIXED command to
treat is as a covariate.

Having to use VARIABLE LEVEL, I've found I prefer not having to type out
all of my variables on BY and WITH, and then again on the MODEL command,
especially with a large number of variables, and when I have more than one
model to run, and I want to run them first with a variable as a factor and
then as a covariate, it's much easier to put a VARIABLE LEVEL command at
the head of a bunch of GENLINMIXED commands than to swap the variable
between BY and WITH in each of a bunch of GENLIN commands.

Your mileage may vary.

Alex




From:   Bruce Weaver <[hidden email]>
To:     [hidden email],
Date:   09/20/2012 10:19 AM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



I mean that I wish GENLINMIXED *did* use the same BY-WITH method that is
used
for GENLIN and a host of other older commands.  I've not played with
GENLINMIXED yet, but I see that when I do, I'll have to be sure to have
the
variable levels set appropriately for all of the explanatory variables
(something I didn't have to bother with using GENLIN etc).



torvon wrote
> Bruce,
>
> Personally, I prefer the old BY categorical WITH continuous variable
>> approach.  That way, if someone has neglected to set variable levels,
>> they'll still get the right model.
>>
>
> I don't understand what you mean with BY and WITH, since these options
are
> not available for GENLINMIXED. Are you saying you wish SPSS implemented
> that?
>
> Doesn't say anywhere whether I have to dummy code my categorical
variables
> for GENLINMIXED or whether SPSS detects the variables correctly.
Sometimes
> SPSS is so annoying.
>
> Eiko





-----
--
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/GenLinMixed-question-tp5715073p5715186.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
--
Bruce Weaver
bweaver@lakeheadu.ca
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.
Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Alex Reutter
Hi Bruce,

Yes, that's one of the positives of BY and WITH -- you don't need to ensure a consistent case basis prior to running GENLIN or MIXED, but I think you do need to prior to running GENLINMIXED.  It would be ideal if you could specify the steps within a single call of the procedure, but that's not there yet.

Alex




From:        Bruce Weaver <[hidden email]>
To:        [hidden email],
Date:        09/21/2012 03:47 PM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi Alex.  Where one is running a series of models with one or more variables
being added at each step (i.e., what one would call hierarchical regression
in the context of linear regression), one has to ensure that the same cases
are used for all steps.  If you have to run a separate model for each step,
as you do for GENLIN and MIXED, you could lose cases (due to missing data)
in the later steps.  One way around that is to list ALL of the variables
that will be in the final model following BY and WITH at each step.  Here's
an example using the cars.sav sample data set.

* Modify path to point to SPSS (English) sample data files.
GET FILE = "C:\SPSSdata\cars.sav".

freq origin.
compute USA = (origin EQ 1).
formats USA(f1).
crosstabs USA by origin.
freq cylinder.
select if any(cylinder,4,6,8).
freq cylinder.

descriptives mpg horse weight cylinder .
* For all variables in full model, listwise valid n = 384.

* Model 1: MPG as only predictor.
* Include only MPG on BY <factors> WITH <covariates> line.
GENLIN USA (REFERENCE=FIRST) WITH mpg
 /MODEL mpg INTERCEPT=YES
DISTRIBUTION=BINOMIAL LINK=LOGIT
 /MISSING CLASSMISSING=EXCLUDE
 /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model uses n = 390 cases with valid data for USA and MGP.
* Now include all FULL MODEL variables on BY <factors> WITH <covariates>
line.

GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
 /MODEL mpg INTERCEPT=YES
DISTRIBUTION=BINOMIAL LINK=LOGIT
 /MISSING CLASSMISSING=EXCLUDE
 /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model now uses only the n = 384 cases with valid data for all full model
variables.

* Model 2:  X = MPG HORSE.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
 /MODEL mpg horse INTERCEPT=YES
DISTRIBUTION=BINOMIAL LINK=LOGIT
 /MISSING CLASSMISSING=EXCLUDE
 /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model 3:  X = MPG HORSE WEIGHT.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
 /MODEL mpg horse weight INTERCEPT=YES
DISTRIBUTION=BINOMIAL LINK=LOGIT
 /MISSING CLASSMISSING=EXCLUDE
 /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model 4:  X = MPG HORSE WEIGHT CYLINDER.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
 /MODEL mpg horse weight cylinder INTERCEPT=YES
DISTRIBUTION=BINOMIAL LINK=LOGIT
 /MISSING CLASSMISSING=EXCLUDE
 /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).


Can GENLINMIXED do that?  Or would one have to first select or flag cases
that have valid data for all variables included in the final model?  From
what you've said, I'm guessing the latter.  If so, I'd have to do something
like the following if I was using GENLINMIXED for the example shown above:

* Flag cases that have all variables needed for the full model.
COMPUTE GoodCase = nmiss(USA,MPG,HORSE,WEIGHT,CYLINDER) EQ 0.
FILTER BY GoodCase.
* Series of GENLINMIXED commands here.
USE ALL.
FILTER OFF.




Alex Reutter wrote
> Right, so in GENLIN, you'd have
>
> GENLIN target BY
> <factor list>
>  WITH
> <covariate list>
>   /MODEL
> <effect list>
> .
>
> and you'd swap time from BY to WITH to treat it as a covariate.  In
> GENLINMIXED, you'd have
>
> GENLINMIXED
>   /FIELDS TARGET=target
>   /FIXED EFFECT=
> <effect list>
> .
>
> and you'd add VARIABLE LEVEL time SCALE. before the GENLINMIXED command to
> treat is as a covariate.
>
> Having to use VARIABLE LEVEL, I've found I prefer not having to type out
> all of my variables on BY and WITH, and then again on the MODEL command,
> especially with a large number of variables, and when I have more than one
> model to run, and I want to run them first with a variable as a factor and
> then as a covariate, it's much easier to put a VARIABLE LEVEL command at
> the head of a bunch of GENLINMIXED commands than to swap the variable
> between BY and WITH in each of a bunch of GENLIN commands.
>
> Your mileage may vary.
>
> Alex
>
>
>
>
> From:   Bruce Weaver &lt;

> bruce.weaver@

> &gt;
> To:

> SPSSX-L@.uga

> ,
> Date:   09/20/2012 10:19 AM
> Subject:        Re: GenLinMixed question
> Sent by:        "SPSSX(r) Discussion" &lt;

> SPSSX-L@.uga

> &gt;
>
>
>
> I mean that I wish GENLINMIXED *did* use the same BY-WITH method that is
> used
> for GENLIN and a host of other older commands.  I've not played with
> GENLINMIXED yet, but I see that when I do, I'll have to be sure to have
> the
> variable levels set appropriately for all of the explanatory variables
> (something I didn't have to bother with using GENLIN etc).
>
>
>
> torvon wrote
>> Bruce,
>>
>> Personally, I prefer the old BY categorical WITH continuous variable
>>> approach.  That way, if someone has neglected to set variable levels,
>>> they'll still get the right model.
>>>
>>
>> I don't understand what you mean with BY and WITH, since these options
> are
>> not available for GENLINMIXED. Are you saying you wish SPSS implemented
>> that?
>>
>> Doesn't say anywhere whether I have to dummy code my categorical
> variables
>> for GENLINMIXED or whether SPSS detects the variables correctly.
> Sometimes
>> SPSS is so annoying.
>>
>> Eiko
>
>
>
>
>
> -----
> --
> Bruce Weaver

> bweaver@

>
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/GenLinMixed-question-tp5715073p5715186.html
>
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (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





-----
--
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/GenLinMixed-question-tp5715073p5715227.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


Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

Bruce Weaver
Administrator
I agree--it would be GREAT if all of the newer procedures allowed multiple hierarchical models/steps with one call to the procedure; and for procedures that use MLE, one should also get a chi-square test on the change in -2LL from one step to the next (analogous to the F-test on the change in R-squared that you get from REGRESSION).  As it stands now, you have to do something like this:  Use OMS to write -2LL values to one new dataset, number of model parameters to another dataset, merge the 2 datasets, use LAG to compute changes in -2LL and number of parameters, and then compute the chi-square & p-values.  

Cheers!
Bruce

Alex Reutter wrote
Hi Bruce,

Yes, that's one of the positives of BY and WITH -- you don't need to
ensure a consistent case basis prior to running GENLIN or MIXED, but I
think you do need to prior to running GENLINMIXED.  It would be ideal if
you could specify the steps within a single call of the procedure, but
that's not there yet.

Alex




From:   Bruce Weaver <[hidden email]>
To:     [hidden email],
Date:   09/21/2012 03:47 PM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



Hi Alex.  Where one is running a series of models with one or more
variables
being added at each step (i.e., what one would call hierarchical
regression
in the context of linear regression), one has to ensure that the same
cases
are used for all steps.  If you have to run a separate model for each
step,
as you do for GENLIN and MIXED, you could lose cases (due to missing data)
in the later steps.  One way around that is to list ALL of the variables
that will be in the final model following BY and WITH at each step. Here's
an example using the cars.sav sample data set.

* Modify path to point to SPSS (English) sample data files.
GET FILE = "C:\SPSSdata\cars.sav".

freq origin.
compute USA = (origin EQ 1).
formats USA(f1).
crosstabs USA by origin.
freq cylinder.
select if any(cylinder,4,6,8).
freq cylinder.

descriptives mpg horse weight cylinder .
* For all variables in full model, listwise valid n = 384.

* Model 1: MPG as only predictor.
* Include only MPG on BY <factors> WITH <covariates> line.
GENLIN USA (REFERENCE=FIRST) WITH mpg
  /MODEL mpg INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model uses n = 390 cases with valid data for USA and MGP.
* Now include all FULL MODEL variables on BY <factors> WITH <covariates>
line.

GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
  /MODEL mpg INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model now uses only the n = 384 cases with valid data for all full model
variables.

* Model 2:  X = MPG HORSE.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
  /MODEL mpg horse INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model 3:  X = MPG HORSE WEIGHT.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
  /MODEL mpg horse weight INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model 4:  X = MPG HORSE WEIGHT CYLINDER.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
  /MODEL mpg horse weight cylinder INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).


Can GENLINMIXED do that?  Or would one have to first select or flag cases
that have valid data for all variables included in the final model?  From
what you've said, I'm guessing the latter.  If so, I'd have to do
something
like the following if I was using GENLINMIXED for the example shown above:

* Flag cases that have all variables needed for the full model.
COMPUTE GoodCase = nmiss(USA,MPG,HORSE,WEIGHT,CYLINDER) EQ 0.
FILTER BY GoodCase.
* Series of GENLINMIXED commands here.
USE ALL.
FILTER OFF.




Alex Reutter wrote
> Right, so in GENLIN, you'd have
>
> GENLIN target BY
> <factor list>
>  WITH
> <covariate list>
>   /MODEL
> <effect list>
> .
>
> and you'd swap time from BY to WITH to treat it as a covariate.  In
> GENLINMIXED, you'd have
>
> GENLINMIXED
>   /FIELDS TARGET=target
>   /FIXED EFFECT=
> <effect list>
> .
>
> and you'd add VARIABLE LEVEL time SCALE. before the GENLINMIXED command
to
> treat is as a covariate.
>
> Having to use VARIABLE LEVEL, I've found I prefer not having to type out
> all of my variables on BY and WITH, and then again on the MODEL command,
> especially with a large number of variables, and when I have more than
one
> model to run, and I want to run them first with a variable as a factor
and
> then as a covariate, it's much easier to put a VARIABLE LEVEL command at
> the head of a bunch of GENLINMIXED commands than to swap the variable
> between BY and WITH in each of a bunch of GENLIN commands.
>
> Your mileage may vary.
>
> Alex
>
>
>
>
> From:   Bruce Weaver <

> bruce.weaver@

> >
> To:

> SPSSX-L@.uga

> ,
> Date:   09/20/2012 10:19 AM
> Subject:        Re: GenLinMixed question
> Sent by:        "SPSSX(r) Discussion" <

> SPSSX-L@.uga

> >
>
>
>
> I mean that I wish GENLINMIXED *did* use the same BY-WITH method that is
> used
> for GENLIN and a host of other older commands.  I've not played with
> GENLINMIXED yet, but I see that when I do, I'll have to be sure to have
> the
> variable levels set appropriately for all of the explanatory variables
> (something I didn't have to bother with using GENLIN etc).
>
>
>
> torvon wrote
>> Bruce,
>>
>> Personally, I prefer the old BY categorical WITH continuous variable
>>> approach.  That way, if someone has neglected to set variable levels,
>>> they'll still get the right model.
>>>
>>
>> I don't understand what you mean with BY and WITH, since these options
> are
>> not available for GENLINMIXED. Are you saying you wish SPSS implemented
>> that?
>>
>> Doesn't say anywhere whether I have to dummy code my categorical
> variables
>> for GENLINMIXED or whether SPSS detects the variables correctly.
> Sometimes
>> SPSS is so annoying.
>>
>> Eiko
>
>
>
>
>
> -----
> --
> Bruce Weaver

> bweaver@

> 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/GenLinMixed-question-tp5715073p5715186.html

>
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (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





-----
--
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/GenLinMixed-question-tp5715073p5715227.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
--
Bruce Weaver
bweaver@lakeheadu.ca
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.
Reply | Threaded
Open this post in threaded view
|

Re: GenLinMixed question

David Marso
Administrator
One could also 'tweezer' the gig by scripting the output and just extract the desired elements.

Bruce Weaver wrote
I agree--it would be GREAT if all of the newer procedures allowed multiple hierarchical models/steps with one call to the procedure; and for procedures that use MLE, one should also get a chi-square test on the change in -2LL from one step to the next (analogous to the F-test on the change in R-squared that you get from REGRESSION).  As it stands now, you have to do something like this:  Use OMS to write -2LL values to one new dataset, number of model parameters to another dataset, merge the 2 datasets, use LAG to compute changes in -2LL and number of parameters, and then compute the chi-square & p-values.  

Cheers!
Bruce

Alex Reutter wrote
Hi Bruce,

Yes, that's one of the positives of BY and WITH -- you don't need to
ensure a consistent case basis prior to running GENLIN or MIXED, but I
think you do need to prior to running GENLINMIXED.  It would be ideal if
you could specify the steps within a single call of the procedure, but
that's not there yet.

Alex




From:   Bruce Weaver <[hidden email]>
To:     [hidden email],
Date:   09/21/2012 03:47 PM
Subject:        Re: GenLinMixed question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



Hi Alex.  Where one is running a series of models with one or more
variables
being added at each step (i.e., what one would call hierarchical
regression
in the context of linear regression), one has to ensure that the same
cases
are used for all steps.  If you have to run a separate model for each
step,
as you do for GENLIN and MIXED, you could lose cases (due to missing data)
in the later steps.  One way around that is to list ALL of the variables
that will be in the final model following BY and WITH at each step. Here's
an example using the cars.sav sample data set.

* Modify path to point to SPSS (English) sample data files.
GET FILE = "C:\SPSSdata\cars.sav".

freq origin.
compute USA = (origin EQ 1).
formats USA(f1).
crosstabs USA by origin.
freq cylinder.
select if any(cylinder,4,6,8).
freq cylinder.

descriptives mpg horse weight cylinder .
* For all variables in full model, listwise valid n = 384.

* Model 1: MPG as only predictor.
* Include only MPG on BY <factors> WITH <covariates> line.
GENLIN USA (REFERENCE=FIRST) WITH mpg
  /MODEL mpg INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model uses n = 390 cases with valid data for USA and MGP.
* Now include all FULL MODEL variables on BY <factors> WITH <covariates>
line.

GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
  /MODEL mpg INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model now uses only the n = 384 cases with valid data for all full model
variables.

* Model 2:  X = MPG HORSE.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
  /MODEL mpg horse INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model 3:  X = MPG HORSE WEIGHT.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
  /MODEL mpg horse weight INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

* Model 4:  X = MPG HORSE WEIGHT CYLINDER.
GENLIN USA (REFERENCE=FIRST) BY  cylinder (ORDER=ASCENDING) WITH mpg horse
weight
  /MODEL mpg horse weight cylinder INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).


Can GENLINMIXED do that?  Or would one have to first select or flag cases
that have valid data for all variables included in the final model?  From
what you've said, I'm guessing the latter.  If so, I'd have to do
something
like the following if I was using GENLINMIXED for the example shown above:

* Flag cases that have all variables needed for the full model.
COMPUTE GoodCase = nmiss(USA,MPG,HORSE,WEIGHT,CYLINDER) EQ 0.
FILTER BY GoodCase.
* Series of GENLINMIXED commands here.
USE ALL.
FILTER OFF.




Alex Reutter wrote
> Right, so in GENLIN, you'd have
>
> GENLIN target BY
> <factor list>
>  WITH
> <covariate list>
>   /MODEL
> <effect list>
> .
>
> and you'd swap time from BY to WITH to treat it as a covariate.  In
> GENLINMIXED, you'd have
>
> GENLINMIXED
>   /FIELDS TARGET=target
>   /FIXED EFFECT=
> <effect list>
> .
>
> and you'd add VARIABLE LEVEL time SCALE. before the GENLINMIXED command
to
> treat is as a covariate.
>
> Having to use VARIABLE LEVEL, I've found I prefer not having to type out
> all of my variables on BY and WITH, and then again on the MODEL command,
> especially with a large number of variables, and when I have more than
one
> model to run, and I want to run them first with a variable as a factor
and
> then as a covariate, it's much easier to put a VARIABLE LEVEL command at
> the head of a bunch of GENLINMIXED commands than to swap the variable
> between BY and WITH in each of a bunch of GENLIN commands.
>
> Your mileage may vary.
>
> Alex
>
>
>
>
> From:   Bruce Weaver <

> bruce.weaver@

> >
> To:

> SPSSX-L@.uga

> ,
> Date:   09/20/2012 10:19 AM
> Subject:        Re: GenLinMixed question
> Sent by:        "SPSSX(r) Discussion" <

> SPSSX-L@.uga

> >
>
>
>
> I mean that I wish GENLINMIXED *did* use the same BY-WITH method that is
> used
> for GENLIN and a host of other older commands.  I've not played with
> GENLINMIXED yet, but I see that when I do, I'll have to be sure to have
> the
> variable levels set appropriately for all of the explanatory variables
> (something I didn't have to bother with using GENLIN etc).
>
>
>
> torvon wrote
>> Bruce,
>>
>> Personally, I prefer the old BY categorical WITH continuous variable
>>> approach.  That way, if someone has neglected to set variable levels,
>>> they'll still get the right model.
>>>
>>
>> I don't understand what you mean with BY and WITH, since these options
> are
>> not available for GENLINMIXED. Are you saying you wish SPSS implemented
>> that?
>>
>> Doesn't say anywhere whether I have to dummy code my categorical
> variables
>> for GENLINMIXED or whether SPSS detects the variables correctly.
> Sometimes
>> SPSS is so annoying.
>>
>> Eiko
>
>
>
>
>
> -----
> --
> Bruce Weaver

> bweaver@

> 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/GenLinMixed-question-tp5715073p5715186.html

>
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (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





-----
--
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/GenLinMixed-question-tp5715073p5715227.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
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?"
12