EMMEANS in GENLINMIXED?

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

EMMEANS in GENLINMIXED?

Robert L

Now I have got this modelling attempt, where the basic approach is to use GENLINMIXED to model a binary response with several observations for each participant. Most details seem clear now, but I still can’t see how the EMMEANS output should be interpreted. There is a choice of scale for the mean:  it could be displayed in terms of the “original target scale” or the “link transformation function”. Furthermore, the final F test and the p-values associated with the result (the contrast estimate) differ depending on the choice of scale. I had hoped it would be possible to find something like a straightforward odds ratio… Comments anyone?

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

Re: EMMEANS in GENLINMIXED?

Ryan
Robert,

Employing the "link transformation function" produces estimates on the log-odds scale. Exponentiate the estimates to arrive at the odds metric (odds or odds ratios estimates).

Employing the "original target function" produces estimates on the probability scale metric (probability or probability difference estimates).

Let's step back for a moment...
 
For any generalized linear model [such as logistic regression], there is a link function that specifies how the the expected value of "Y" (a.k.a. "E(Y)") and the linear combination of predictors, "eta" are related. Note that:
 
eta = b0 + b1*X1 + b2*X2 + ... + bkXk
 
For the binomial response, the expected value of "Y" can be defined as:
 
E(Y) = P(Y=1) = exp(eta) / (1 + exp(eta))
 
The typical link for a binomial response is:
 
log(p/(1-p)) = eta
 
which is known as the logit link, where
 
p = P(Y=1)
 
*Note: P(Y=0) could also be modeled.
 
Ryan
 

On Tue, Jun 28, 2016 at 7:47 AM, Robert Lundqvist <[hidden email]> wrote:

Now I have got this modelling attempt, where the basic approach is to use GENLINMIXED to model a binary response with several observations for each participant. Most details seem clear now, but I still can’t see how the EMMEANS output should be interpreted. There is a choice of scale for the mean:  it could be displayed in terms of the “original target scale” or the “link transformation function”. Furthermore, the final F test and the p-values associated with the result (the contrast estimate) differ depending on the choice of scale. I had hoped it would be possible to find something like a straightforward odds ratio… Comments anyone?

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

Re: EMMEANS in GENLINMIXED?

Robert L
In reply to this post by Robert L

Thanks for your input Ryan, it’s a clear description of the connection between the choice of scale and what is found in the output. But there are still details I don’t understand. In order to simplify as much as possible, I ran that three models run in parallel, one ordinary logistic regression, the second with GENLIN  and the third with GENLINMIXED set up as close to a logistic regression model as I could. The following syntax was used:

 

*Logistic regression.

LOGISTIC REGRESSION VARIABLES NewTPA7yr

  /METHOD=ENTER group

  /CONTRAST (group)=Indicator(1)

  /CRITERIA=PIN(.05) POUT(.10) ITERATE(20) CUT(.5).

 

* Generalized Linear Models (with CRITERIA set at defaults).

GENLIN NewTPA7yr (REFERENCE=FIRST) BY group (ORDER=ASCENDING)

  /MODEL group INTERCEPT=YES

DISTRIBUTION=BINOMIAL LINK=LOGIT

  /EMMEANS TABLES=group SCALE=ORIGINAL COMPARE=group CONTRAST=SIMPLE(0) PADJUST=LSD.

 

*Generalized Linear Mixed Models (with BUILD_OPTIONS set at defaults).

GENLINMIXED

  /FIELDS TARGET=NewTPA7yr TRIALS=NONE OFFSET=NONE

  /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT

  /FIXED  EFFECTS=group USE_INTERCEPT=TRUE

  /EMMEANS TABLES=group COMPARE=group CONTRAST=SIMPLE

  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD.

 

Some of the surprising results:

 

·         GENLINMIXED produces an estimate of the coefficient for the group variable, but no p-values and the like. There are no such problems with logistic regression or GENLIN.

·         GENLINMIXED has set group=1 as the reference value, which makes it seem as if there is a higher odds (Exp(Coefficient)=1.372 in the Fixed Coefficients table) for a high value on the response in group=0. However, it should be the other way round, which is what is found with the logistic regression and GENLIN. Knowing what happens makes it easy to deal with though.

·         The EMMEANS says the same: the mean for group=1 is on a lower level than group=0, which should be the opposite

·         I thought that in such a simple example there would be some correspondence between the coefficients and the EMMEANS result, but there is none. This assumption might be wrong…

 

So there seems to be two questions:

 

1)      Why doesn’t  GENLINMIXED produce any  df’s or p-values in this simple situation where LOGISTIC REGRESSION and GENLIN work as intended?

2)      How could output from EMMEANS be interpreted (using the original scale) in a logistic regression setting, GENLIN or GENLINMIXED? This is a question which really has nothing to do with the setup of the analysis but rather says something about my ignorance regarding EMMEANS.

 

Sorry for this long posting.

 

Robert

 

Från: SPSSX(r) Discussion [mailto:[hidden email]] För Ryan Black
Skickat: den 28 juni 2016 14:28
Till: [hidden email]
Ämne: Re: EMMEANS in GENLINMIXED?

 

Robert,

 

Employing the "link transformation function" produces estimates on the log-odds scale. Exponentiate the estimates to arrive at the odds metric (odds or odds ratios estimates).

 

Employing the "original target function" produces estimates on the probability scale metric (probability or probability difference estimates).

 

Let's step back for a moment...

 

For any generalized linear model [such as logistic regression], there is a link function that specifies how the the expected value of "Y" (a.k.a. "E(Y)") and the linear combination of predictors, "eta" are related. Note that:

 

eta = b0 + b1*X1 + b2*X2 + ... + bkXk

 

For the binomial response, the expected value of "Y" can be defined as:

 

E(Y) = P(Y=1) = exp(eta) / (1 + exp(eta))

 

The typical link for a binomial response is:

 

log(p/(1-p)) = eta

 

which is known as the logit link, where

 

p = P(Y=1)

 

*Note: P(Y=0) could also be modeled.

 

Ryan

 

 

On Tue, Jun 28, 2016 at 7:47 AM, Robert Lundqvist <[hidden email]> wrote:

Now I have got this modelling attempt, where the basic approach is to use GENLINMIXED to model a binary response with several observations for each participant. Most details seem clear now, but I still can’t see how the EMMEANS output should be interpreted. There is a choice of scale for the mean:  it could be displayed in terms of the “original target scale” or the “link transformation function”. Furthermore, the final F test and the p-values associated with the result (the contrast estimate) differ depending on the choice of scale. I had hoped it would be possible to find something like a straightforward odds ratio… Comments anyone?

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

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

Re: EMMEANS in GENLINMIXED?

Ryan
Robert,

1. The GENLINMIXED procedure *should* report p-values for the effects in the model. Are you receiving any error messages? You might want to contact SPSS support.

2. As I stated before, the "original scale" is on the probability scale. So, you would interpret those estimates of group-specific probabilities or probability differences between groups. These are not the same as the "transformed scale" which would produce estimates of group-specific log-odds or log-odds differences between groups. 

The relationship between probability and log-odds can be shown as:

probability = e^log-odds / (1 + e^log-odds) = odds / (1 + odds)

e^log-odds = odds = probability / (1 - probability)


An odds ratio (OR) of an event can be defined as:

OR = odds(event | group 1) / odds(event | group 2)

= e^(log-odds(event | group 1) MINUS log-odds(event | group 2))

HTH.

Ryan

On Tue, Jun 28, 2016 at 10:11 AM, Robert Lundqvist <[hidden email]> wrote:

Thanks for your input Ryan, it’s a clear description of the connection between the choice of scale and what is found in the output. But there are still details I don’t understand. In order to simplify as much as possible, I ran that three models run in parallel, one ordinary logistic regression, the second with GENLIN  and the third with GENLINMIXED set up as close to a logistic regression model as I could. The following syntax was used:

 

*Logistic regression.

LOGISTIC REGRESSION VARIABLES NewTPA7yr

  /METHOD=ENTER group

  /CONTRAST (group)=Indicator(1)

  /CRITERIA=PIN(.05) POUT(.10) ITERATE(20) CUT(.5).

 

* Generalized Linear Models (with CRITERIA set at defaults).

GENLIN NewTPA7yr (REFERENCE=FIRST) BY group (ORDER=ASCENDING)

  /MODEL group INTERCEPT=YES

DISTRIBUTION=BINOMIAL LINK=LOGIT

  /EMMEANS TABLES=group SCALE=ORIGINAL COMPARE=group CONTRAST=SIMPLE(0) PADJUST=LSD.

 

*Generalized Linear Mixed Models (with BUILD_OPTIONS set at defaults).

GENLINMIXED

  /FIELDS TARGET=NewTPA7yr TRIALS=NONE OFFSET=NONE

  /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT

  /FIXED  EFFECTS=group USE_INTERCEPT=TRUE

  /EMMEANS TABLES=group COMPARE=group CONTRAST=SIMPLE

  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD.

 

Some of the surprising results:

 

·         GENLINMIXED produces an estimate of the coefficient for the group variable, but no p-values and the like. There are no such problems with logistic regression or GENLIN.

·         GENLINMIXED has set group=1 as the reference value, which makes it seem as if there is a higher odds (Exp(Coefficient)=1.372 in the Fixed Coefficients table) for a high value on the response in group=0. However, it should be the other way round, which is what is found with the logistic regression and GENLIN. Knowing what happens makes it easy to deal with though.

·         The EMMEANS says the same: the mean for group=1 is on a lower level than group=0, which should be the opposite

·         I thought that in such a simple example there would be some correspondence between the coefficients and the EMMEANS result, but there is none. This assumption might be wrong…

 

So there seems to be two questions:

 

1)      Why doesn’t  GENLINMIXED produce any  df’s or p-values in this simple situation where LOGISTIC REGRESSION and GENLIN work as intended?

2)      How could output from EMMEANS be interpreted (using the original scale) in a logistic regression setting, GENLIN or GENLINMIXED? This is a question which really has nothing to do with the setup of the analysis but rather says something about my ignorance regarding EMMEANS.

 

Sorry for this long posting.

 

Robert

 

Från: SPSSX(r) Discussion [mailto:[hidden email]] För Ryan Black
Skickat: den 28 juni 2016 14:28
Till: [hidden email]
Ämne: Re: EMMEANS in GENLINMIXED?

 

Robert,

 

Employing the "link transformation function" produces estimates on the log-odds scale. Exponentiate the estimates to arrive at the odds metric (odds or odds ratios estimates).

 

Employing the "original target function" produces estimates on the probability scale metric (probability or probability difference estimates).

 

Let's step back for a moment...

 

For any generalized linear model [such as logistic regression], there is a link function that specifies how the the expected value of "Y" (a.k.a. "E(Y)") and the linear combination of predictors, "eta" are related. Note that:

 

eta = b0 + b1*X1 + b2*X2 + ... + bkXk

 

For the binomial response, the expected value of "Y" can be defined as:

 

E(Y) = P(Y=1) = exp(eta) / (1 + exp(eta))

 

The typical link for a binomial response is:

 

log(p/(1-p)) = eta

 

which is known as the logit link, where

 

p = P(Y=1)

 

*Note: P(Y=0) could also be modeled.

 

Ryan

 

 

On Tue, Jun 28, 2016 at 7:47 AM, Robert Lundqvist <[hidden email]> wrote:

Now I have got this modelling attempt, where the basic approach is to use GENLINMIXED to model a binary response with several observations for each participant. Most details seem clear now, but I still can’t see how the EMMEANS output should be interpreted. There is a choice of scale for the mean:  it could be displayed in terms of the “original target scale” or the “link transformation function”. Furthermore, the final F test and the p-values associated with the result (the contrast estimate) differ depending on the choice of scale. I had hoped it would be possible to find something like a straightforward odds ratio… Comments anyone?

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

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

Re: EMMEANS in GENLINMIXED?

Maguin, Eugene

After reading Robert’s post yesterday I tried out genlinmixed on 24 and, yes, p values and 95% CI values are missing throughout. What version are you using Robert?

Gene Maguin

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ryan Black
Sent: Tuesday, June 28, 2016 10:43 PM
To: [hidden email]
Subject: Re: EMMEANS in GENLINMIXED?

 

Robert,

 

1. The GENLINMIXED procedure *should* report p-values for the effects in the model. Are you receiving any error messages? You might want to contact SPSS support.

 

2. As I stated before, the "original scale" is on the probability scale. So, you would interpret those estimates of group-specific probabilities or probability differences between groups. These are not the same as the "transformed scale" which would produce estimates of group-specific log-odds or log-odds differences between groups. 

 

The relationship between probability and log-odds can be shown as:

 

probability = e^log-odds / (1 + e^log-odds) = odds / (1 + odds)

 

e^log-odds = odds = probability / (1 - probability)

 

 

An odds ratio (OR) of an event can be defined as:

 

OR = odds(event | group 1) / odds(event | group 2)

 

= e^(log-odds(event | group 1) MINUS log-odds(event | group 2))

 

HTH.

 

Ryan

 

On Tue, Jun 28, 2016 at 10:11 AM, Robert Lundqvist <[hidden email]> wrote:

Thanks for your input Ryan, it’s a clear description of the connection between the choice of scale and what is found in the output. But there are still details I don’t understand. In order to simplify as much as possible, I ran that three models run in parallel, one ordinary logistic regression, the second with GENLIN  and the third with GENLINMIXED set up as close to a logistic regression model as I could. The following syntax was used:

 

*Logistic regression.

LOGISTIC REGRESSION VARIABLES NewTPA7yr

  /METHOD=ENTER group

  /CONTRAST (group)=Indicator(1)

  /CRITERIA=PIN(.05) POUT(.10) ITERATE(20) CUT(.5).

 

* Generalized Linear Models (with CRITERIA set at defaults).

GENLIN NewTPA7yr (REFERENCE=FIRST) BY group (ORDER=ASCENDING)

  /MODEL group INTERCEPT=YES

DISTRIBUTION=BINOMIAL LINK=LOGIT

  /EMMEANS TABLES=group SCALE=ORIGINAL COMPARE=group CONTRAST=SIMPLE(0) PADJUST=LSD.

 

*Generalized Linear Mixed Models (with BUILD_OPTIONS set at defaults).

GENLINMIXED

  /FIELDS TARGET=NewTPA7yr TRIALS=NONE OFFSET=NONE

  /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT

  /FIXED  EFFECTS=group USE_INTERCEPT=TRUE

  /EMMEANS TABLES=group COMPARE=group CONTRAST=SIMPLE

  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD.

 

Some of the surprising results:

 

·         GENLINMIXED produces an estimate of the coefficient for the group variable, but no p-values and the like. There are no such problems with logistic regression or GENLIN.

·         GENLINMIXED has set group=1 as the reference value, which makes it seem as if there is a higher odds (Exp(Coefficient)=1.372 in the Fixed Coefficients table) for a high value on the response in group=0. However, it should be the other way round, which is what is found with the logistic regression and GENLIN. Knowing what happens makes it easy to deal with though.

·         The EMMEANS says the same: the mean for group=1 is on a lower level than group=0, which should be the opposite

·         I thought that in such a simple example there would be some correspondence between the coefficients and the EMMEANS result, but there is none. This assumption might be wrong…

 

So there seems to be two questions:

 

1)      Why doesn’t  GENLINMIXED produce any  df’s or p-values in this simple situation where LOGISTIC REGRESSION and GENLIN work as intended?

2)      How could output from EMMEANS be interpreted (using the original scale) in a logistic regression setting, GENLIN or GENLINMIXED? This is a question which really has nothing to do with the setup of the analysis but rather says something about my ignorance regarding EMMEANS.

 

Sorry for this long posting.

 

Robert

 

Från: SPSSX(r) Discussion [mailto:[hidden email]] För Ryan Black
Skickat: den 28 juni 2016 14:28
Till: [hidden email]
Ämne: Re: EMMEANS in GENLINMIXED?

 

Robert,

 

Employing the "link transformation function" produces estimates on the log-odds scale. Exponentiate the estimates to arrive at the odds metric (odds or odds ratios estimates).

 

Employing the "original target function" produces estimates on the probability scale metric (probability or probability difference estimates).

 

Let's step back for a moment...

 

For any generalized linear model [such as logistic regression], there is a link function that specifies how the the expected value of "Y" (a.k.a. "E(Y)") and the linear combination of predictors, "eta" are related. Note that:

 

eta = b0 + b1*X1 + b2*X2 + ... + bkXk

 

For the binomial response, the expected value of "Y" can be defined as:

 

E(Y) = P(Y=1) = exp(eta) / (1 + exp(eta))

 

The typical link for a binomial response is:

 

log(p/(1-p)) = eta

 

which is known as the logit link, where

 

p = P(Y=1)

 

*Note: P(Y=0) could also be modeled.

 

Ryan

 

 

On Tue, Jun 28, 2016 at 7:47 AM, Robert Lundqvist <[hidden email]> wrote:

Now I have got this modelling attempt, where the basic approach is to use GENLINMIXED to model a binary response with several observations for each participant. Most details seem clear now, but I still can’t see how the EMMEANS output should be interpreted. There is a choice of scale for the mean:  it could be displayed in terms of the “original target scale” or the “link transformation function”. Furthermore, the final F test and the p-values associated with the result (the contrast estimate) differ depending on the choice of scale. I had hoped it would be possible to find something like a straightforward odds ratio… Comments anyone?

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

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

===================== 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: EMMEANS in GENLINMIXED?

Robert L
In reply to this post by Robert L

It’s version 24. The strange thing is that more complicated models with more predictors show no signs of missing p values. But if a simple model does not work correctly, could the more complicated ones be trusted?

 

Robert

 

Från: SPSSX(r) Discussion [mailto:[hidden email]] För Maguin, Eugene
Skickat: den 29 juni 2016 14:53
Till: [hidden email]
Ämne: Re: EMMEANS in GENLINMIXED?

 

After reading Robert’s post yesterday I tried out genlinmixed on 24 and, yes, p values and 95% CI values are missing throughout. What version are you using Robert?

Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Robert Lundqvist
Reply | Threaded
Open this post in threaded view
|

Re: EMMEANS in GENLINMIXED?

Maguin, Eugene

Interesting that the error is limited to one IV. The specificity would make it hard to produce. I haven’t tested what I’m going to say but I’d guess that the coefficient values are correct and the problem is in the coding for the results display.  The reported coefficients, SEs, sig values and Cis could be checked against logistic or genlin.

Gene Maguin

 

 

From: Robert Lundqvist [mailto:[hidden email]]
Sent: Wednesday, June 29, 2016 10:31 AM
To: Maguin, Eugene <[hidden email]>; [hidden email]
Subject: Re: EMMEANS in GENLINMIXED?

 

It’s version 24. The strange thing is that more complicated models with more predictors show no signs of missing p values. But if a simple model does not work correctly, could the more complicated ones be trusted?

 

Robert

 

Från: SPSSX(r) Discussion [[hidden email]] För Maguin, Eugene
Skickat: den 29 juni 2016 14:53
Till: [hidden email]
Ämne: Re: EMMEANS in GENLINMIXED?

 

After reading Robert’s post yesterday I tried out genlinmixed on 24 and, yes, p values and 95% CI values are missing throughout. What version are you using Robert?

Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: EMMEANS in GENLINMIXED?

Bruce Weaver
Administrator
In reply to this post by Maguin, Eugene
In a related thread (http://spssx-discussion.1045642.n5.nabble.com/GENLINMIXED-EMMEANS-with-no-additional-keywords-not-working-td5732547.html), Gene asked if I was also seeing this missing p-value and CI problem using v23.0.0.2.  The answer is that for the models I am estimating, NO, I am not seeing that problem.  Those who are reading via Nabble can see ouput for my models in the attached Excel file.  

Gene, if you want me to try the same model you used, send me the data and your syntax.  (Please use my Lakehead U e-mail address, which I think you have, not this hotmail address.)  

HTH.

GENLINMIXED_output_from_SPSS_v23.xls

Maguin, Eugene wrote
After reading Robert’s post yesterday I tried out genlinmixed on 24 and, yes, p values and 95% CI values are missing throughout. What version are you using Robert?
Gene Maguin


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ryan Black
Sent: Tuesday, June 28, 2016 10:43 PM
To: [hidden email]
Subject: Re: EMMEANS in GENLINMIXED?

Robert,

1. The GENLINMIXED procedure *should* report p-values for the effects in the model. Are you receiving any error messages? You might want to contact SPSS support.

2. As I stated before, the "original scale" is on the probability scale. So, you would interpret those estimates of group-specific probabilities or probability differences between groups. These are not the same as the "transformed scale" which would produce estimates of group-specific log-odds or log-odds differences between groups.

The relationship between probability and log-odds can be shown as:

probability = e^log-odds / (1 + e^log-odds) = odds / (1 + odds)

e^log-odds = odds = probability / (1 - probability)


An odds ratio (OR) of an event can be defined as:

OR = odds(event | group 1) / odds(event | group 2)

= e^(log-odds(event | group 1) MINUS log-odds(event | group 2))

HTH.

Ryan

On Tue, Jun 28, 2016 at 10:11 AM, Robert Lundqvist <[hidden email]<mailto:[hidden email]>> wrote:
Thanks for your input Ryan, it’s a clear description of the connection between the choice of scale and what is found in the output. But there are still details I don’t understand. In order to simplify as much as possible, I ran that three models run in parallel, one ordinary logistic regression, the second with GENLIN  and the third with GENLINMIXED set up as close to a logistic regression model as I could. The following syntax was used:

*Logistic regression.
LOGISTIC REGRESSION VARIABLES NewTPA7yr
  /METHOD=ENTER group
  /CONTRAST (group)=Indicator(1)
  /CRITERIA=PIN(.05) POUT(.10) ITERATE(20) CUT(.5).

* Generalized Linear Models (with CRITERIA set at defaults).
GENLIN NewTPA7yr (REFERENCE=FIRST) BY group (ORDER=ASCENDING)
  /MODEL group INTERCEPT=YES
DISTRIBUTION=BINOMIAL LINK=LOGIT
  /EMMEANS TABLES=group SCALE=ORIGINAL COMPARE=group CONTRAST=SIMPLE(0) PADJUST=LSD.

*Generalized Linear Mixed Models (with BUILD_OPTIONS set at defaults).
GENLINMIXED
  /FIELDS TARGET=NewTPA7yr TRIALS=NONE OFFSET=NONE
  /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT
  /FIXED  EFFECTS=group USE_INTERCEPT=TRUE
  /EMMEANS TABLES=group COMPARE=group CONTRAST=SIMPLE
  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD.

Some of the surprising results:


•         GENLINMIXED produces an estimate of the coefficient for the group variable, but no p-values and the like. There are no such problems with logistic regression or GENLIN.

•         GENLINMIXED has set group=1 as the reference value, which makes it seem as if there is a higher odds (Exp(Coefficient)=1.372 in the Fixed Coefficients table) for a high value on the response in group=0. However, it should be the other way round, which is what is found with the logistic regression and GENLIN. Knowing what happens makes it easy to deal with though.

•         The EMMEANS says the same: the mean for group=1 is on a lower level than group=0, which should be the opposite

•         I thought that in such a simple example there would be some correspondence between the coefficients and the EMMEANS result, but there is none. This assumption might be wrong…

So there seems to be two questions:


1)      Why doesn’t  GENLINMIXED produce any  df’s or p-values in this simple situation where LOGISTIC REGRESSION and GENLIN work as intended?

2)      How could output from EMMEANS be interpreted (using the original scale) in a logistic regression setting, GENLIN or GENLINMIXED? This is a question which really has nothing to do with the setup of the analysis but rather says something about my ignorance regarding EMMEANS.

Sorry for this long posting.

Robert

Från: SPSSX(r) Discussion [mailto:[hidden email]<mailto:[hidden email]>] För Ryan Black
Skickat: den 28 juni 2016 14:28
Till: [hidden email]<mailto:[hidden email]>
Ämne: Re: EMMEANS in GENLINMIXED?

Robert,

Employing the "link transformation function" produces estimates on the log-odds scale. Exponentiate the estimates to arrive at the odds metric (odds or odds ratios estimates).

Employing the "original target function" produces estimates on the probability scale metric (probability or probability difference estimates).

Let's step back for a moment...

For any generalized linear model [such as logistic regression], there is a link function that specifies how the the expected value of "Y" (a.k.a. "E(Y)") and the linear combination of predictors, "eta" are related. Note that:

eta = b0 + b1*X1 + b2*X2 + ... + bkXk

For the binomial response, the expected value of "Y" can be defined as:

E(Y) = P(Y=1) = exp(eta) / (1 + exp(eta))

The typical link for a binomial response is:

log(p/(1-p)) = eta

which is known as the logit link, where

p = P(Y=1)

*Note: P(Y=0) could also be modeled.

Ryan


On Tue, Jun 28, 2016 at 7:47 AM, Robert Lundqvist <[hidden email]<mailto:[hidden email]>> wrote:
Now I have got this modelling attempt, where the basic approach is to use GENLINMIXED to model a binary response with several observations for each participant. Most details seem clear now, but I still can’t see how the EMMEANS output should be interpreted. There is a choice of scale for the mean:  it could be displayed in terms of the “original target scale” or the “link transformation function”. Furthermore, the final F test and the p-values associated with the result (the contrast estimate) differ depending on the choice of scale. I had hoped it would be possible to find something like a straightforward odds ratio… Comments anyone?
===================== To manage your subscription to SPSSX-L, send a message to [hidden email]<mailto:[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]<mailto:[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]<mailto:[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]<mailto:[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
--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: GENLINMIXED: EMMEANS with no additional keywords not working

Ryan
In reply to this post by Robert L
Hello:

I'm observing similar issues with GENLINMIXED using v. 24. I fit a simple model with a single dichotomous indicator and no p-values are provided.

Try simulation below.

Ryan

--

set seed 98765432.
new file.
input program.
      loop ID= 1 to 10000.
      compute group = rv.bernoulli(0.5).
      compute b0 = -1.2.
      compute b1 = 2.4.
      compute eta  = b0 + b1*group.
      compute prob = exp(eta) / (1+ exp(eta)).
      compute y = rv.bernoulli(prob).
      end case.
    end loop.
 end file.
 end input program.
 execute.

 Delete variables b0 b1 eta prob.

LOGISTIC REGRESSION VARIABLES y
  /METHOD=ENTER group
  /CONTRAST (group)=Indicator(1).

GENLIN y (REFERENCE=FIRST) BY group (ORDER=DESCENDING)
  /MODEL group INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
   /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED)
  /EMMEANS TABLES=group SCALE=TRANSFORMED COMPARE=group CONTRAST=SIMPLE(0) PADJUST=LSD.

GENLINMIXED
  /FIELDS TARGET=y TRIALS=NONE OFFSET=NONE
  /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT
  /FIXED  EFFECTS=group USE_INTERCEPT=TRUE
  /EMMEANS TABLES=group COMPARE=group CONTRAST=PAIRWISE
  /EMMEANS_OPTIONS SCALE=TRANSFORMED PADJUST=LSD.


On Wed, Jun 29, 2016 at 4:55 PM, Maguin, Eugene <[hidden email]> wrote:
Bruce, I understand that your focus is different but I'm curious since you're running 23 patched whether you see the problem (missing sig and CI values given just one IV) that Robert described.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver
Sent: Wednesday, June 29, 2016 4:51 PM
To: [hidden email]
Subject: Re: GENLINMIXED: EMMEANS with no additional keywords not working

I should have said v23.0.0.2.  So I don't think it's a problem with missing patches.


Bruce Weaver wrote
> --- snip most of the original post ---
>
> I am using v23 for Windows, by the way.  And the data are from a
> General Social Survey dataset, one version of which used to come with
> SPSS as a "sample" dataset.
>
> Bruce





-----
--
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-EMMEANS-with-no-additional-keywords-not-working-tp5732547p5732548.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

===================== 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: EMMEANS with no additional keywords not working

Bruce Weaver
Administrator
I just ran Ryan's simulation with v23.0.0.2, and I get no p-values or CIs in the GENLINMIXED output.


Ryan Black wrote
Hello:

I'm observing similar issues with GENLINMIXED using v. 24. I fit a simple
model with a single dichotomous indicator and no p-values are provided.

Try simulation below.

Ryan

--

set seed 98765432.
new file.
input program.
      loop ID= 1 to 10000.
      compute group = rv.bernoulli(0.5).
      compute b0 = -1.2.
      compute b1 = 2.4.
      compute eta  = b0 + b1*group.
      compute prob = exp(eta) / (1+ exp(eta)).
      compute y = rv.bernoulli(prob).
      end case.
    end loop.
 end file.
 end input program.
 execute.

 Delete variables b0 b1 eta prob.

LOGISTIC REGRESSION VARIABLES y
  /METHOD=ENTER group
  /CONTRAST (group)=Indicator(1).

GENLIN y (REFERENCE=FIRST) BY group (ORDER=DESCENDING)
  /MODEL group INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
   /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED)
  /EMMEANS TABLES=group SCALE=TRANSFORMED COMPARE=group CONTRAST=SIMPLE(0)
PADJUST=LSD.

GENLINMIXED
  /FIELDS TARGET=y TRIALS=NONE OFFSET=NONE
  /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT
  /FIXED  EFFECTS=group USE_INTERCEPT=TRUE
  /EMMEANS TABLES=group COMPARE=group CONTRAST=PAIRWISE
  /EMMEANS_OPTIONS SCALE=TRANSFORMED PADJUST=LSD.
--
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/).