Handling a Categorical Covariate

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

Handling a Categorical Covariate

Salbod
I have 3 outcome scales (scale1,scale2,scale3). One categorical IV (A-4 levels) and one categorical Covariate (B-4 levels). I want to basically do an ANCOVA and make comparisons between adjusted A means.

Does the following code do that?

GLM scale1 scale2 scale3 BY A B
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(A) COMPARE ADJ(BONFERRONI)
  /PRINT=DESCRIPTIVE ETASQ
  /CRITERIA=ALPHA(.05)
  /DESIGN= A B.

(The A*B interaction was not significant.)

Also, I'm looking for a reference to this approach: treating a categorical covariate as a factor in the analysis.  I came across blocking in ANOVA, but no reference was provided. In Bruning & Kintz's Computational Handbook of Statistics this approach is referred to a Treatment X Level design.  

Any suggestions will be greatly appreciated.

Stephen Salbod, Pace University, NYC
Reply | Threaded
Open this post in threaded view
|

Re: Handling a Categorical Covariate

Salbod
I ran the standard ANCOVA with 3 dummy variable representing B Factor.

UNIANOVA scael1, scale2, scale3 BY A WITH bD1 bD2 bD3
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(A) WITH(bD1=MEAN bD2=MEAN bD3=MEAN) COMPARE ADJ(BONFERRONI)
  /PRINT=ETASQ
  /CRITERIA=ALPHA(.05)
  /DESIGN=bD1 bD2 bD3 A.

I get the same mean differences for the Bonferroni procedure but not the same means. They are adjusted with the means of the dummy variables. Therefore, my analysis is nothing more than an ANCOVA. It seems that the computation of the means is throwing me off.  


Reply | Threaded
Open this post in threaded view
|

Re: Handling a Categorical Covariate

Bruce Weaver
Administrator
If there is no interaction term in the model, the differences among the various levels of A will be the same at any and all levels of B--with no interaction, the effect of A does not depend on the level of B.

But you might try something like the following to see if you can produce the same EMMEANS as you get when you treat B as a fixed factor.

UNIANOVA scael1, scale2, scale3 BY A WITH bD1 bD2 bD3
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(A) WITH(bD1=1 bD2=0 bD3=0) COMPARE ADJ(BONFERRONI)
  /EMMEANS=TABLES(A) WITH(bD1=0 bD2=1 bD3=0) COMPARE ADJ(BONFERRONI)
  /EMMEANS=TABLES(A) WITH(bD1=0 bD2=0 bD3=1) COMPARE ADJ(BONFERRONI)
  /EMMEANS=TABLES(A) WITH(bD1=0 bD2=0 bD3=0) COMPARE ADJ(BONFERRONI)
  /PRINT=ETASQ
  /CRITERIA=ALPHA(.05)
  /DESIGN=bD1 bD2 bD3 A.

HTH.


Salbod wrote
I ran the standard ANCOVA with 3 dummy variable representing B Factor.

UNIANOVA scael1, scale2, scale3 BY A WITH bD1 bD2 bD3
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(A) WITH(bD1=MEAN bD2=MEAN bD3=MEAN) COMPARE ADJ(BONFERRONI)
  /PRINT=ETASQ
  /CRITERIA=ALPHA(.05)
  /DESIGN=bD1 bD2 bD3 A.

I get the same mean differences for the Bonferroni procedure but not the same means. They are adjusted with the means of the dummy variables. Therefore, my analysis is nothing more than an ANCOVA. It seems that the computation of the means is throwing me off.
--
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: Handling a Categorical Covariate

Salbod
Thanks, Bruce,
I could have used this earlier. I ran the regression model using dummy codes. Plugging in the codes I calculated the predicted means in the 4 X 4 table. I then estimated margin means for A and B. The EMMEAN code generates the means for the four A levels at each level of B.

I'm going to report the analysis as an ANCOVA and refer to the adjusted mean table to indicate differences (Bonferroni, p < .05) between A levels.

--Steve

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver
Sent: Saturday, February 08, 2014 4:45 PM
To: [hidden email]
Subject: Re: Handling a Categorical Covariate

If there is no interaction term in the model, the differences among the various levels of A will be the same at any and all levels of B--with no interaction, the effect of A does not depend on the level of B.

But you might try something like the following to see if you can produce the same EMMEANS as you get when you treat B as a fixed factor.

UNIANOVA scael1, scale2, scale3 BY A WITH bD1 bD2 bD3
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(A) WITH(bD1=1 bD2=0 bD3=0) COMPARE ADJ(BONFERRONI)
  /EMMEANS=TABLES(A) WITH(bD1=0 bD2=1 bD3=0) COMPARE ADJ(BONFERRONI)
  /EMMEANS=TABLES(A) WITH(bD1=0 bD2=0 bD3=1) COMPARE ADJ(BONFERRONI)
  /EMMEANS=TABLES(A) WITH(bD1=0 bD2=0 bD3=0) COMPARE ADJ(BONFERRONI)
  /PRINT=ETASQ
  /CRITERIA=ALPHA(.05)
  /DESIGN=bD1 bD2 bD3 A.

HTH.



Salbod wrote

> I ran the standard ANCOVA with 3 dummy variable representing B Factor.
>
> UNIANOVA scael1, scale2, scale3 BY A WITH bD1 bD2 bD3
>   /METHOD=SSTYPE(3)
>   /INTERCEPT=INCLUDE
>   /EMMEANS=TABLES(A) WITH(bD1=MEAN bD2=MEAN bD3=MEAN) COMPARE
> ADJ(BONFERRONI)
>   /PRINT=ETASQ
>   /CRITERIA=ALPHA(.05)
>   /DESIGN=bD1 bD2 bD3 A.
>
> I get the same mean differences for the Bonferroni procedure but not
> the same means. They are adjusted with the means of the dummy variables.
> Therefore, my analysis is nothing more than an ANCOVA. It seems that
> the computation of the means is throwing me off.





-----
--
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/Handling-a-Categorical-Covariate-tp5724379p5724386.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: Handling a Categorical Covariate

Salbod
In reply to this post by Salbod
I think I found a reference in Roger Kirk's 1968 book, "Experimental Design: Procedures for the Behavioral Sciences". He has a section on Control of Nuisance Variables (see attached-enjoy ;) ). Is there someone in the twenty-first century who has written about this?

--SteveKirk,_RE-Nuisance_Variables.pdf

Reply | Threaded
Open this post in threaded view
|

Re: Handling a Categorical Covariate

Mike
Take a look at the 2013 edition of Cohen, Cohen, West & Aiken;
starting page 350. You can see some of this on books.google.com:
http://books.google.com/books?id=gkalyqTMXNEC&printsec=frontcover&dq=cohen+%22multiple+regression%22&hl=en&sa=X&ei=sLL3UprPIrSpsATjtoGoDQ&ved=0CD0Q6AEwAA#v=onepage&q=ANCOVA%20assumptions&f=false

-Mike Palij
New York University
[hidden email]
-

----- Original Message -----
From: "Salbod" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, February 09, 2014 11:48 AM
Subject: Re: Handling a Categorical Covariate


>I think I found a reference in Roger Kirk's 1968 book, "Experimental
>Design:
> Procedures for the Behavioral Sciences". He has a section on Control
> of
> Nuisance Variables (see attached-enjoy ;) ). Is there someone in the
> twenty-first century who has written about this?
>
> --Steve Kirk,_RE-Nuisance_Variables.pdf
> <http://spssx-discussion.1045642.n5.nabble.com/file/n5724395/Kirk%2C_RE-Nuisance_Variables.pdf>

=====================
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: Handling a Categorical Covariate

Salbod
Hi Mike, thanks for the reference.

I did initially look at that section (in the 3rd ed.).  Now that I'm enjoying the chase I'm definitely going to do a very slow re-read.

--Steve

-----Original Message-----
From: Mike Palij [mailto:[hidden email]]
Sent: Sunday, February 09, 2014 12:07 PM
To: Salbod, Mr. Stephen; [hidden email]
Cc: Michael Palij
Subject: Re: Re: Handling a Categorical Covariate

Take a look at the 2013 edition of Cohen, Cohen, West & Aiken; starting page 350. You can see some of this on books.google.com:
http://books.google.com/books?id=gkalyqTMXNEC&printsec=frontcover&dq=cohen+%22multiple+regression%22&hl=en&sa=X&ei=sLL3UprPIrSpsATjtoGoDQ&ved=0CD0Q6AEwAA#v=onepage&q=ANCOVA%20assumptions&f=false

-Mike Palij
New York University
[hidden email]
-

----- Original Message -----
From: "Salbod" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, February 09, 2014 11:48 AM
Subject: Re: Handling a Categorical Covariate


>I think I found a reference in Roger Kirk's 1968 book, "Experimental
>Design:
> Procedures for the Behavioral Sciences". He has a section on Control
> of
> Nuisance Variables (see attached-enjoy ;) ). Is there someone in the
> twenty-first century who has written about this?
>
> --Steve Kirk,_RE-Nuisance_Variables.pdf
> <http://spssx-discussion.1045642.n5.nabble.com/file/n5724395/Kirk%2C_RE-Nuisance_Variables.pdf>

=====================
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: Handling a Categorical Covariate

Mike
Kirk's (2013) 4th edition of Experimental Design is another possibility
though
his coverage of ANCOVA (chapter 13) is somewhat different from his
earlier editions; see:
http://books.google.com/books?id=CYiqQDHRJVUC&printsec=frontcover&dq=kirk+%22experimental+design%22&hl=en&sa=X&ei=H8L3UvDNEYzMsQTaxYG4Dg&ved=0CDYQ6AEwAA#v=onepage&q=ANCOVA&f=false

I admit that though I have a copy of this edition, I haven't read this
chapter.

-Mike Palij
New York University
[hidden email]


----- Original Message -----
From: "Salbod, Mr. Stephen" <[hidden email]>
To: "Mike Palij" <[hidden email]>; <[hidden email]>
Sent: Sunday, February 09, 2014 12:22 PM
Subject: RE: Re: Handling a Categorical Covariate


Hi Mike, thanks for the reference.

I did initially look at that section (in the 3rd ed.).  Now that I'm
enjoying the chase I'm definitely going to do a very slow re-read.

--Steve

-----Original Message-----
From: Mike Palij [mailto:[hidden email]]
Sent: Sunday, February 09, 2014 12:07 PM
To: Salbod, Mr. Stephen; [hidden email]
Cc: Michael Palij
Subject: Re: Re: Handling a Categorical Covariate

Take a look at the 2013 edition of Cohen, Cohen, West & Aiken; starting
page 350. You can see some of this on books.google.com:
http://books.google.com/books?id=gkalyqTMXNEC&printsec=frontcover&dq=cohen+%22multiple+regression%22&hl=en&sa=X&ei=sLL3UprPIrSpsATjtoGoDQ&ved=0CD0Q6AEwAA#v=onepage&q=ANCOVA%20assumptions&f=false

-Mike Palij
New York University
[hidden email]
-

----- Original Message -----
From: "Salbod" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, February 09, 2014 11:48 AM
Subject: Re: Handling a Categorical Covariate


>I think I found a reference in Roger Kirk's 1968 book, "Experimental
>Design:
> Procedures for the Behavioral Sciences". He has a section on Control
> of
> Nuisance Variables (see attached-enjoy ;) ). Is there someone in the
> twenty-first century who has written about this?
>
> --Steve Kirk,_RE-Nuisance_Variables.pdf
> <http://spssx-discussion.1045642.n5.nabble.com/file/n5724395/Kirk%2C_RE-Nuisance_Variables.pdf>

=====================
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: Handling a Categorical Covariate

Richard Ristow
In reply to this post by Salbod
At 11:05 AM 2/9/2014, Salbod, Mr. Stephen wrote:

>I'm going to report the analysis as an ANCOVA and refer to the
>adjusted mean table to indicate differences (Bonferroni, p < .05)
>between A levels.

Will they let you? I'd have thought that including a second
categorical variable in the model makes it a two-way ANOVA rather
than an ANCOVA. Admittedly that doesn't change the actual analysis.

=====================
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: Handling a Categorical Covariate

Salbod
My head hurts :)

I just had the old Pearson r versus a point-biserial r flash. That is, if I'm going to report ANCOVA I will have the supporting analyses for that design.

--Steve

-----Original Message-----
From: Richard Ristow [mailto:[hidden email]]
Sent: Sunday, February 09, 2014 8:52 PM
To: Salbod, Mr. Stephen; [hidden email]
Subject: Re: Handling a Categorical Covariate

At 11:05 AM 2/9/2014, Salbod, Mr. Stephen wrote:

>I'm going to report the analysis as an ANCOVA and refer to the adjusted
>mean table to indicate differences (Bonferroni, p < .05) between A
>levels.

Will they let you? I'd have thought that including a second categorical variable in the model makes it a two-way ANOVA rather than an ANCOVA. Admittedly that doesn't change the actual analysis.

=====================
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: Handling a Categorical Covariate

Bruce Weaver
Administrator
In reply to this post by Richard Ristow
I think many people interpret "two-way ANOVA" to mean that the interaction term is included.  As it is not included in Stephen's model, I would be explicit, and call it a two-way ANOVA with main effects only, or with the interaction term excluded.  Something like that.

On the other hand, one could always call it a general linear model with two categorical explanatory variables.  ;-)


Richard Ristow wrote
At 11:05 AM 2/9/2014, Salbod, Mr. Stephen wrote:

>I'm going to report the analysis as an ANCOVA and refer to the
>adjusted mean table to indicate differences (Bonferroni, p < .05)
>between A levels.

Will they let you? I'd have thought that including a second
categorical variable in the model makes it a two-way ANOVA rather
than an ANCOVA. Admittedly that doesn't change the actual analysis.

=====================
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: Handling a Categorical Covariate

Salbod
In reply to this post by Bruce Weaver
Hi Bruce,

As I was comparing the analyses I noticed that the model was evaluated at the following values: bD1 = .5497, bD2 = .1462, and bD3 = .1579. These were the means for the dummy coded variables. When I use 0.25 I get same estimated means that I got with ANOVA blocking B.

/EMMEANS=TABLES(A) WITH(bD1=.25 bD2=.25 bD3 =.25) COMPARE ADJ(BONFERRONI)

What does this statement do? When I hand calculated the estimated means I first created a 4 X 4 matrix of predicted means and divided the A columns by 4 (or X .25). Is that what is happening?

Puzzled, Steve



Reply | Threaded
Open this post in threaded view
|

Re: Handling a Categorical Covariate

Bruce Weaver
Administrator
That EMMEANS sub-command will give you the estimated marginal means for the different levels of A with the 3 indicator variables for B set to .25.  It's not clear to me why you want to set them to .25 though.  What are you trying to show?


Salbod wrote
Hi Bruce,

As I was comparing the analyses I noticed that the model was evaluated at the following values: bD1 = .5497, bD2 = .1462, and bD3 = .1579. These were the means for the dummy coded variables. When I use 0.25 I get same estimated means that I got with ANOVA blocking B.

/EMMEANS=TABLES(A) WITH(bD1=.25 bD2=.25 bD3 =.25) COMPARE ADJ(BONFERRONI)

What does this statement do? When I hand calculated the estimated means I first created a 4 X 4 matrix of predicted means and divided the A columns by 4 (or X .25). Is that what is happening?

Puzzled, Steve
--
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
|

Fwd: Handling a Categorical Covariate

Ryan
In reply to this post by Salbod
Steve,

You should ask yourself whether it is reasonable to assume an equal distribution across levels of the "categorical covariate" or to assume the distribution is more accurately reflected by the observed marginal distribution. 

The assumption you make should result in different estimated means. Are you suggesting that the estimated means in your output are the same regardless of what you assume for the distribution across the levels of the "categorical covariate"? That does not seem right to me. 

Ryan

---------- Forwarded message ----------
From: Salbod <[hidden email]>
Date: Fri, Feb 21, 2014 at 4:00 PM
Subject: Re: Handling a Categorical Covariate
To: [hidden email]


Hi Bruce,

As I was comparing the analyses I noticed that the model was evaluated at
the following values: bD1 = .5497, bD2 = .1462, and bD3 = .1579. These were
the means for the dummy coded variables. When I use 0.25 I get same
estimated means that I got with ANOVA blocking B.

/EMMEANS=TABLES(A) WITH(bD1=.25 bD2=.25 bD3 =.25) COMPARE ADJ(BONFERRONI)

What does this statement do? When I hand calculated the estimated means I
first created a 4 X 4 matrix of predicted means and divided the A columns by
4 (or X .25). Is that what is happening?

Puzzled, Steve







--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Handling-a-Categorical-Covariate-tp5724379p5724598.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: Handling a Categorical Covariate

Salbod
In reply to this post by Bruce Weaver
Hi Bruce,
      Thank you for moving me along. I've included my dataset this time (I'm learning.).The bonferroni between the Anova approach and the Ancova approach are identical. The only difference is the Anova produces estimated means ~.015 greater than the Ancova. Shouldn't the adjusted means be equal?

--Steve

Anova_Ancova.sav
ANOVA_ANCOVA.sps
Reply | Threaded
Open this post in threaded view
|

Re: Handling a Categorical Covariate

Bruce Weaver
Administrator
For the benefit of those not reading via Nabble (and therefore unable to see the attached files), Steve attached a syntax file with these two UNIANOVA commands:

UNIANOVA scale1 BY a_factor b_factor
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(a_factor) COMPARE ADJ(BONFERRONI)
  /CRITERIA=ALPHA(.05)
  /DESIGN=a_factor b_factor.

UNIANOVA scale1 BY a_factor WITH bD1 bD2 bD3
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(a_factor) WITH(bD1=MEAN bD2=MEAN bD3=MEAN) COMPARE ADJ(BONFERRONI)
  /CRITERIA=ALPHA(.05)
  /DESIGN=bD1 bD2 bD3 a_factor.


RESULTS

In the following table, Mean1 and Mean2 are the estimated marginal means for a_factor from the two models, and Diff is Mean1 - Mean2.

A  Mean1  Mean2   Diff
1  4.697  4.682  0.01505
2  5.380  5.364  0.01590
3  5.322  5.307  0.01507
4  4.695  4.679  0.01550

Steve's question is why do the estimated marginal means for a_factor from these two models differ by about .015?  Off the top of my head, I don't know.



Salbod wrote
Hi Bruce,
      Thank you for moving me along. I've included my dataset this time (I'm learning.).The bonferroni between the Anova approach and the Ancova approach are identical. The only difference is the Anova produces estimated means ~.015 greater than the Ancova. Shouldn't the adjusted means be equal?

--Steve

Anova_Ancova.sav
ANOVA_ANCOVA.sps
--
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: Handling a Categorical Covariate

Salbod
Thank you Bruce for reposting on the list and stating my problem much clear than I did. --Steve

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver
Sent: Wednesday, February 26, 2014 5:23 PM
To: [hidden email]
Subject: Re: Handling a Categorical Covariate

For the benefit of those not reading via Nabble (and therefore unable to see the attached files), Steve attached a syntax file with these two UNIANOVA
commands:

UNIANOVA scale1 BY a_factor b_factor
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(a_factor) COMPARE ADJ(BONFERRONI)
  /CRITERIA=ALPHA(.05)
  /DESIGN=a_factor b_factor.

UNIANOVA scale1 BY a_factor WITH bD1 bD2 bD3
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(a_factor) WITH(bD1=MEAN bD2=MEAN bD3=MEAN) COMPARE
ADJ(BONFERRONI)
  /CRITERIA=ALPHA(.05)
  /DESIGN=bD1 bD2 bD3 a_factor.


RESULTS

In the following table, Mean1 and Mean2 are the estimated marginal means for a_factor from the two models, and Diff is Mean1 - Mean2.

A  Mean1  Mean2   Diff
1  4.697  4.682   0.01505
2  5.380  5.364   0.01590
3  5.322  5.307   0.01507
4  4.695  4.679   0.01550

Steve's question is why do the estimated marginal means for a_factor from these two models differ by about .015?  Off the top of my head, I don't know.




Salbod wrote

> Hi Bruce,
>       Thank you for moving me along. I've included my dataset this
> time (I'm learning.).The bonferroni between the Anova approach and the
> Ancova approach are identical. The only difference is the Anova
> produces estimated means ~.015 greater than the Ancova. Shouldn't the
> adjusted means be equal?
>
> --Steve
> Anova_Ancova.sav
> <http://spssx-discussion.1045642.n5.nabble.com/file/n5724649/Anova_Anc
> ova.sav>
>
> ANOVA_ANCOVA.sps
> <http://spssx-discussion.1045642.n5.nabble.com/file/n5724649/ANOVA_ANC
> OVA.sps>




-----
--
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/Handling-a-Categorical-Covariate-tp5724379p5724650.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: Handling a Categorical Covariate

Ryan
In reply to this post by Bruce Weaver
Steve/Bruce,

Earlier I said:


Wit that in mind, it looks as though the first UNIANOVA is assuming an equal distribution across the "categorical covariate." The second UNIANOVA is setting the values equal to the mean of the indicators. So, if we want both sets of code to yield identical marginal means, then we'll need to change 

  /EMMEANS=TABLES(a_factor) WITH(bD1=MEAN bD2=MEAN bD3=MEAN) COMPARE
ADJ(BONFERRONI)

to

  /EMMEANS=TABLES(a_factor) WITH(bD1=0.25 bD2=0.25 bD3=0.25) COMPARE
ADJ(BONFERRONI)

Qualifier: I haven't tested the code above.

Ryan


On Wed, Feb 26, 2014 at 5:22 PM, Bruce Weaver <[hidden email]> wrote:
For the benefit of those not reading via Nabble (and therefore unable to see
the attached files), Steve attached a syntax file with these two UNIANOVA
commands:

UNIANOVA scale1 BY a_factor b_factor
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(a_factor) COMPARE ADJ(BONFERRONI)
  /CRITERIA=ALPHA(.05)
  /DESIGN=a_factor b_factor.

UNIANOVA scale1 BY a_factor WITH bD1 bD2 bD3
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(a_factor) WITH(bD1=MEAN bD2=MEAN bD3=MEAN) COMPARE
ADJ(BONFERRONI)
  /CRITERIA=ALPHA(.05)
  /DESIGN=bD1 bD2 bD3 a_factor.


RESULTS

In the following table, Mean1 and Mean2 are the estimated marginal means for
a_factor from the two models, and Diff is Mean1 - Mean2.

A  Mean1  Mean2   Diff
1  4.697  4.682   0.01505
2  5.380  5.364   0.01590
3  5.322  5.307   0.01507
4  4.695  4.679   0.01550

Steve's question is why do the estimated marginal means for a_factor from
these two models differ by about .015?  Off the top of my head, I don't
know.




Salbod wrote
> Hi Bruce,
>       Thank you for moving me along. I've included my dataset this time
> (I'm learning.).The bonferroni between the Anova approach and the Ancova
> approach are identical. The only difference is the Anova produces
> estimated means ~.015 greater than the Ancova. Shouldn't the adjusted
> means be equal?
>
> --Steve
> Anova_Ancova.sav
> <http://spssx-discussion.1045642.n5.nabble.com/file/n5724649/Anova_Ancova.sav>
>
> ANOVA_ANCOVA.sps
> <http://spssx-discussion.1045642.n5.nabble.com/file/n5724649/ANOVA_ANCOVA.sps>




-----
--
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/Handling-a-Categorical-Covariate-tp5724379p5724650.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: Handling a Categorical Covariate

Bruce Weaver
Administrator
Ah, okay.  Now I'm with you, Ryan.  

To summarize, if one runs THESE two UNIANOVA commands using Steve's data....

UNIANOVA scale1 BY a_factor b_factor
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(a_factor) COMPARE ADJ(BONFERRONI)
  /CRITERIA=ALPHA(.05)
  /DESIGN=a_factor b_factor.

UNIANOVA scale1 BY a_factor WITH bD1 bD2 bD3
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(a_factor) WITH(bD1=.25 bD2=.25 bD3=.25) COMPARE ADJ(BONFERRONI)
  /CRITERIA=ALPHA(.05)
  /DESIGN=bD1 bD2 bD3 a_factor.

...the estimated marginal means for a_factor are virtually identical, as shown below.

A  Mean1  Mean2   Diff
1  4.697  4.697  0.00005
2  5.380  5.38 -0.00010
3  5.322  5.322  0.00007
4  4.695  4.695 -0.00050

So the first UNIANOVA model above computes so-called "unweighted" means.  Or as textbook author David Howell would say, equally weighted means (which is what the second UNIANOVA command does).  

HTH.

Ryan Black wrote
Steve/Bruce,

Earlier I said:

http://listserv.uga.edu/cgi-bin/wa?A2=ind1402&L=spssx-l&P=R40387

Wit that in mind, it looks as though the first UNIANOVA is assuming an
equal distribution across the "categorical covariate." The second UNIANOVA
is setting the values equal to the mean of the indicators. So, if we want
both sets of code to yield identical marginal means, then we'll need to
change

  /EMMEANS=TABLES(a_factor) WITH(bD1=MEAN bD2=MEAN bD3=MEAN) COMPARE
ADJ(BONFERRONI)

to

  /EMMEANS=TABLES(a_factor) WITH(bD1=0.25 bD2=0.25 bD3=0.25) COMPARE
ADJ(BONFERRONI)

Qualifier: I haven't tested the code above.

Ryan


On Wed, Feb 26, 2014 at 5:22 PM, Bruce Weaver <[hidden email]>wrote:

> For the benefit of those not reading via Nabble (and therefore unable to
> see
> the attached files), Steve attached a syntax file with these two UNIANOVA
> commands:
>
> UNIANOVA scale1 BY a_factor b_factor
>   /METHOD=SSTYPE(3)
>   /INTERCEPT=INCLUDE
>   /EMMEANS=TABLES(a_factor) COMPARE ADJ(BONFERRONI)
>   /CRITERIA=ALPHA(.05)
>   /DESIGN=a_factor b_factor.
>
> UNIANOVA scale1 BY a_factor WITH bD1 bD2 bD3
>   /METHOD=SSTYPE(3)
>   /INTERCEPT=INCLUDE
>   /EMMEANS=TABLES(a_factor) WITH(bD1=MEAN bD2=MEAN bD3=MEAN) COMPARE
> ADJ(BONFERRONI)
>   /CRITERIA=ALPHA(.05)
>   /DESIGN=bD1 bD2 bD3 a_factor.
>
>
> RESULTS
>
> In the following table, Mean1 and Mean2 are the estimated marginal means
> for
> a_factor from the two models, and Diff is Mean1 - Mean2.
>
> A  Mean1  Mean2   Diff
> 1  4.697  4.682   0.01505
> 2  5.380  5.364   0.01590
> 3  5.322  5.307   0.01507
> 4  4.695  4.679   0.01550
>
> Steve's question is why do the estimated marginal means for a_factor from
> these two models differ by about .015?  Off the top of my head, I don't
> know.
>
>
>
>
> Salbod wrote
> > Hi Bruce,
> >       Thank you for moving me along. I've included my dataset this time
> > (I'm learning.).The bonferroni between the Anova approach and the Ancova
> > approach are identical. The only difference is the Anova produces
> > estimated means ~.015 greater than the Ancova. Shouldn't the adjusted
> > means be equal?
> >
> > --Steve
> > Anova_Ancova.sav
> > <
> http://spssx-discussion.1045642.n5.nabble.com/file/n5724649/Anova_Ancova.sav
> >
> >
> > ANOVA_ANCOVA.sps
> > <
> http://spssx-discussion.1045642.n5.nabble.com/file/n5724649/ANOVA_ANCOVA.sps
> >
>
>
>
>
> -----
> --
> 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/Handling-a-Categorical-Covariate-tp5724379p5724650.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."

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: Handling a Categorical Covariate

Art Kendall
In reply to this post by Salbod
In recent years a the term "covariate" has come to include nominal level variables.

However, in my experience, it is easier to understand results if the nominal level variable is treated as a factor in ANOVA.  in addition, the interaction term can either be included in the model if necessary or can be used to reduce the error term.

Why not use a 4 * 4 ANOVA?
Art Kendall
Social Research Consultants
On 2/8/2014 1:29 PM, Salbod [via SPSSX Discussion] wrote:
I have 3 outcome scales (scale1,scale2,scale3). One categorical IV (A-4 levels) and one categorical Covariate (B-4 levels). I want to basically do an ANCOVA and make comparisons between adjusted A means.

Does the following code do that?

GLM scale1 scale2 scale3 BY A B
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(A) COMPARE ADJ(BONFERRONI)
  /PRINT=DESCRIPTIVE ETASQ
  /CRITERIA=ALPHA(.05)
  /DESIGN= A B.

(The A*B interaction was not significant.)

Also, I'm looking for a reference to this approach: treating a categorical covariate as a factor in the analysis.  I came across blocking in ANOVA, but no reference was provided. In Bruning & Kintz's Computational Handbook of Statistics this approach is referred to a Treatment X Level design.  

Any suggestions will be greatly appreciated.

Stephen Salbod, Pace University, NYC



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Handling-a-Categorical-Covariate-tp5724379.html
To start a new topic under SPSSX Discussion, email [hidden email]
To unsubscribe from SPSSX Discussion, click here.
NAML

Art Kendall
Social Research Consultants