Planned Contrasts in Mixed Models in SPSS

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

Planned Contrasts in Mixed Models in SPSS

BristolMasters
Hi,

I am trying to run a planned contrast and was wondering if anyone could help me.

I am running a Generalized Mixed Model in SPSS (Analyze --> Mixed Models --> General Linear Model). I have 2 Repeated/Random variables (Reef and Site nested within Reef). My dependent variable is Diversity. My fixed factors are Treatment (4 levels), Order (2 levels) and Time (2 levels).

I want to compare two of my Treatment groups to the other two. The groups are Control, Small Trout, Trout and Shark. I want to compare Control and Small Trout vs Trout and Shark.

My Syntax looks like this at the moment:

GENLINMIXED
  /DATA_STRUCTURE SUBJECTS=Reef*Site
  /FIELDS TARGET=Diversity TRIALS=NONE OFFSET=NONE
  /TARGET_OPTIONS DISTRIBUTION=NORMAL LINK=IDENTITY
  /FIXED  EFFECTS=Treatment Order Tme USE_INTERCEPT=TRUE
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Reef COVARIANCE_TYPE=VARIANCE_COMPONENTS
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Reef*Site COVARIANCE_TYPE=VARIANCE_COMPONENTS
  /BUILD_OPTIONS TARGET_CATEGORY_ORDER=ASCENDING INPUTS_CATEGORY_ORDER=ASCENDING MAX_ITERATIONS=100
    CONFIDENCE_LEVEL=95 DF_METHOD=RESIDUAL COVB=MODEL PCONVERGE=0.000001(ABSOLUTE) SCORING=0
    SINGULAR=0.000000000001
  /EMMEANS TABLES=Treatment CONTRAST=NONE
   /EMMEANS TABLES=Order CONTRAST=NONE
   /EMMEANS TABLES=Tme CONTRAST=NONE
  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD
  /SAVE PREDICTED_VALUES(PredictedValue)  PEARSON_RESIDUALS(PearsonResidual).

Any help would be greatly appreciated.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Planned Contrasts in Mixed Models in SPSS

Maguin, Eugene
I'm not at all an expert on GenLinMixed . I'd just like to ask two naive questions and offer a comment. 1) As I read you syntax, your DV, Diversity, is a normal distribution variable. So why not use Mixed? I'd expect that the numbers would be the same with either. Just curious. 2) You said treatment has four levels but you want to combine them to get two levels. Ok, so why not do that combination before the analysis rather than as a planned comparison? If I'm wrong, I'm fine with being told that. Lastly, if you want to keep treatment as a four category variable and then combine groups, as I read the genlinmixed documentation, you can not do that. Look at the mixed documentation, page 1105-6, specifically. Note the setup for the 'Contrasts of A' effect.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of BristolMasters
Sent: Monday, May 18, 2015 8:27 AM
To: [hidden email]
Subject: Planned Contrasts in Mixed Models in SPSS

Hi,

I am trying to run a planned contrast and was wondering if anyone could help me.

I am running a Generalized Mixed Model in SPSS (Analyze --> Mixed Models --> General Linear Model). I have 2 Repeated/Random variables (Reef and Site nested within Reef). My dependent variable is Diversity. My fixed factors are Treatment (4 levels), Order (2 levels) and Time (2 levels).

I want to compare two of my Treatment groups to the other two. The groups are Control, Small Trout, Trout and Shark. I want to compare Control and Small Trout vs Trout and Shark.

My Syntax looks like this at the moment:

GENLINMIXED
  /DATA_STRUCTURE SUBJECTS=Reef*Site
  /FIELDS TARGET=Diversity TRIALS=NONE OFFSET=NONE
  /TARGET_OPTIONS DISTRIBUTION=NORMAL LINK=IDENTITY
  /FIXED  EFFECTS=Treatment Order Tme USE_INTERCEPT=TRUE
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Reef COVARIANCE_TYPE=VARIANCE_COMPONENTS
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Reef*Site COVARIANCE_TYPE=VARIANCE_COMPONENTS
  /BUILD_OPTIONS TARGET_CATEGORY_ORDER=ASCENDING INPUTS_CATEGORY_ORDER=ASCENDING MAX_ITERATIONS=100
    CONFIDENCE_LEVEL=95 DF_METHOD=RESIDUAL COVB=MODEL
PCONVERGE=0.000001(ABSOLUTE) SCORING=0
    SINGULAR=0.000000000001
  /EMMEANS TABLES=Treatment CONTRAST=NONE
   /EMMEANS TABLES=Order CONTRAST=NONE
   /EMMEANS TABLES=Tme CONTRAST=NONE
  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD
  /SAVE PREDICTED_VALUES(PredictedValue) PEARSON_RESIDUALS(PearsonResidual).

Any help would be greatly appreciated.

Thanks.



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Planned-Contrasts-in-Mixed-Models-in-SPSS-tp5729571.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
Reply | Threaded
Open this post in threaded view
|

Re: Planned Contrasts in Mixed Models in SPSS

Bruce Weaver
Administrator
I agree with Gene.  If you use MIXED, you can use the TEST sub-command.  Ryan Black has posted several examples in the past.  See the following thread, for example.

http://spssx-discussion.1045642.n5.nabble.com/Help-with-mixed-model-contrasts-td5718358.html

HTH.


Maguin, Eugene wrote
I'm not at all an expert on GenLinMixed . I'd just like to ask two naive questions and offer a comment. 1) As I read you syntax, your DV, Diversity, is a normal distribution variable. So why not use Mixed? I'd expect that the numbers would be the same with either. Just curious. 2) You said treatment has four levels but you want to combine them to get two levels. Ok, so why not do that combination before the analysis rather than as a planned comparison? If I'm wrong, I'm fine with being told that. Lastly, if you want to keep treatment as a four category variable and then combine groups, as I read the genlinmixed documentation, you can not do that. Look at the mixed documentation, page 1105-6, specifically. Note the setup for the 'Contrasts of A' effect.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of BristolMasters
Sent: Monday, May 18, 2015 8:27 AM
To: [hidden email]
Subject: Planned Contrasts in Mixed Models in SPSS

Hi,

I am trying to run a planned contrast and was wondering if anyone could help me.

I am running a Generalized Mixed Model in SPSS (Analyze --> Mixed Models --> General Linear Model). I have 2 Repeated/Random variables (Reef and Site nested within Reef). My dependent variable is Diversity. My fixed factors are Treatment (4 levels), Order (2 levels) and Time (2 levels).

I want to compare two of my Treatment groups to the other two. The groups are Control, Small Trout, Trout and Shark. I want to compare Control and Small Trout vs Trout and Shark.

My Syntax looks like this at the moment:

GENLINMIXED
  /DATA_STRUCTURE SUBJECTS=Reef*Site
  /FIELDS TARGET=Diversity TRIALS=NONE OFFSET=NONE
  /TARGET_OPTIONS DISTRIBUTION=NORMAL LINK=IDENTITY
  /FIXED  EFFECTS=Treatment Order Tme USE_INTERCEPT=TRUE
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Reef COVARIANCE_TYPE=VARIANCE_COMPONENTS
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Reef*Site COVARIANCE_TYPE=VARIANCE_COMPONENTS
  /BUILD_OPTIONS TARGET_CATEGORY_ORDER=ASCENDING INPUTS_CATEGORY_ORDER=ASCENDING MAX_ITERATIONS=100
    CONFIDENCE_LEVEL=95 DF_METHOD=RESIDUAL COVB=MODEL
PCONVERGE=0.000001(ABSOLUTE) SCORING=0
    SINGULAR=0.000000000001
  /EMMEANS TABLES=Treatment CONTRAST=NONE
   /EMMEANS TABLES=Order CONTRAST=NONE
   /EMMEANS TABLES=Tme CONTRAST=NONE
  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD
  /SAVE PREDICTED_VALUES(PredictedValue) PEARSON_RESIDUALS(PearsonResidual).

Any help would be greatly appreciated.

Thanks.



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Planned-Contrasts-in-Mixed-Models-in-SPSS-tp5729571.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
--
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/).