mixed procedure question

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

mixed procedure question

Maguin, Eugene

I ran the same multilevel model in mixed two different ways and received, no pun, mixed results.

This is the model statement for way 1. IL and TX are 0,1 variables and wave is three time points (0-3)

 

mixed total with wave tx il/fixed wave wave*wave tx

   wave*tx il wave*il tx*il wave*tx*il/

   print solution/random intercept wave | subject(rid) covtype(un).

 

Several of the effects are significant and since emmeans doesn’t play at all with covariates unless a “with” is used, I reversed-coded IL and TX and treated them as “by” variables in the way 2 version. When ran the model with the reversed variables I was startled to see some differences between the two results. The differences were in the Type III Tests of Fixed Effect table. Of the nine terms, including the intercept, six are different between the two model versions. Different in the denominator dof, F value, and significance values. But when I look at the Estimates of Fixed effects table: no differences, the same estimates, SEs, dfs, etc for both models. The same is true of the covariance parameters. Furthermore, the significance values in the Type III table and Estimates table correspond in the way 1 model but not so for the way 2 model using the reversed items and the “by” keyword.

 

I can’t make up plausible story for these differences. Can someone help me?

Thanks, 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: mixed procedure question

Bruce Weaver
Administrator
Hi Gene.  If I follow what you're doing, you're missing some terms.  If you
treated all 3 of your variables as categorical (i.e., had them follow BY),
and if you included all 2- and 3-way interactions, you would eat up 11 df
(if I counted correctly).  So when you treat them as continuous (following
WITH), and include polynomial terms where there are 2 or more categories,
then you still need 11 df.  And I think you are missing a couple of terms.
I reckon you need all of the following terms in your model (with W standing
for Wave):

IL
TX
W
W*W
IL*TX
IL*W
IL*W*W
TX*W
TX*W*W
IL*TX*W
IL*TX*W*W

You have only these 8 terms:

wave
wave*wave
tx  
wave*tx
il
wave*il
tx*il
wave*tx*il

The 3 you are missing are the ones that involve the quadratic component of
the interactions with Wave:

IL*W*W
TX*W*W
IL*TX*W*W

By the way, you said Wave has 3 levels, but then said 0-3.  Did you mean
0-2?  I assumed you did.

HTH.
Bruce



Maguin, Eugene wrote

> I ran the same multilevel model in mixed two different ways and received,
> no pun, mixed results.
> This is the model statement for way 1. IL and TX are 0,1 variables and
> wave is three time points (0-3)
>
> mixed total with wave tx il/fixed wave wave*wave tx
>    wave*tx il wave*il tx*il wave*tx*il/
>    print solution/random intercept wave | subject(rid) covtype(un).
>
> Several of the effects are significant and since emmeans doesn't play at
> all with covariates unless a "with" is used, I reversed-coded IL and TX
> and treated them as "by" variables in the way 2 version. When ran the
> model with the reversed variables I was startled to see some differences
> between the two results. The differences were in the Type III Tests of
> Fixed Effect table. Of the nine terms, including the intercept, six are
> different between the two model versions. Different in the denominator
> dof, F value, and significance values. But when I look at the Estimates of
> Fixed effects table: no differences, the same estimates, SEs, dfs, etc for
> both models. The same is true of the covariance parameters. Furthermore,
> the significance values in the Type III table and Estimates table
> correspond in the way 1 model but not so for the way 2 model using the
> reversed items and the "by" keyword.
>
> I can't make up plausible story for these differences. Can someone help
> me?
> Thanks, Gene Maguin
>
>
> =====================
> 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.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
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: mixed procedure question

Maguin, Eugene
Hi Bruce,
Thanks for your reply. 0-3 should have been 0-2. The wave*wave term was not-random. It didn't have sufficient variance and stole variance from the linear term. The plot of the data shows that total rises from time=0 to time=1 and rises another small amount at time=2. So you see a quadratic shaped curve. Had wave*wave had variance I would have needed the terms you noted. When I first realized that emmeans required the 'by' word, I made all three variables 'by' variables. Doing so removes the linear assumption and estimates a value at each time point relative the reference for that variable. Perhaps I should have described the problem as a multilevel growth curve model. The log likelihood value for both versions is the same. I got into this problem because I have several significant interactions and I need to look at simple effects. Probably the test command would give me what I need but I've understood how to use it.
Gene Maguin


-----Original Message-----
From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Bruce Weaver
Sent: Thursday, March 18, 2021 6:13 PM
To: [hidden email]
Subject: Re: mixed procedure question

Hi Gene.  If I follow what you're doing, you're missing some terms.  If you treated all 3 of your variables as categorical (i.e., had them follow BY), and if you included all 2- and 3-way interactions, you would eat up 11 df (if I counted correctly).  So when you treat them as continuous (following WITH), and include polynomial terms where there are 2 or more categories, then you still need 11 df.  And I think you are missing a couple of terms.
I reckon you need all of the following terms in your model (with W standing for Wave):

IL
TX
W
W*W
IL*TX
IL*W
IL*W*W
TX*W
TX*W*W
IL*TX*W
IL*TX*W*W

You have only these 8 terms:

wave
wave*wave
tx  
wave*tx
il
wave*il
tx*il
wave*tx*il

The 3 you are missing are the ones that involve the quadratic component of the interactions with Wave:

IL*W*W
TX*W*W
IL*TX*W*W

By the way, you said Wave has 3 levels, but then said 0-3.  Did you mean 0-2?  I assumed you did.

HTH.
Bruce



Maguin, Eugene wrote

> I ran the same multilevel model in mixed two different ways and
> received, no pun, mixed results.
> This is the model statement for way 1. IL and TX are 0,1 variables and
> wave is three time points (0-3)
>
> mixed total with wave tx il/fixed wave wave*wave tx
>    wave*tx il wave*il tx*il wave*tx*il/
>    print solution/random intercept wave | subject(rid) covtype(un).
>
> Several of the effects are significant and since emmeans doesn't play
> at all with covariates unless a "with" is used, I reversed-coded IL
> and TX and treated them as "by" variables in the way 2 version. When
> ran the model with the reversed variables I was startled to see some
> differences between the two results. The differences were in the Type
> III Tests of Fixed Effect table. Of the nine terms, including the
> intercept, six are different between the two model versions. Different
> in the denominator dof, F value, and significance values. But when I
> look at the Estimates of Fixed effects table: no differences, the same
> estimates, SEs, dfs, etc for both models. The same is true of the
> covariance parameters. Furthermore, the significance values in the
> Type III table and Estimates table correspond in the way 1 model but
> not so for the way 2 model using the reversed items and the "by" keyword.
>
> I can't make up plausible story for these differences. Can someone
> help me?
> Thanks, Gene Maguin
>
>
> =====================
> 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.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

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

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