contrast (orthogonal) coding with unequal cell frequencies

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

contrast (orthogonal) coding with unequal cell frequencies

Sidra
Hi Friends,
 I made a post on this forum a few days back relating to use of categorical variables in multiple regression analysis. I was suggested to create contrast groups to overcome the issue I was facing. I have created two contrast variables for a categorical variable with three levels.

Variable levels/categories are:
1-single,  2-married/widowed/divorced- with children,  3-married/widowed/divorced- without children

 I created following two contrast variables(as I was suggested)

category levels      single       mwd-having children          mwd-without children


Contrast 1              -2                +1                              +1

Contrast 2               0                +1                               -1
 
Now the issue is while I was brushing up on my knowledge of contrast coding, I read that categories/levels with unequal size (n) should be adjusted by multiplying each code with the number of observations for the corresponding cell. But  I'm not really sure how to do it exactly and even after I have done it, how to make sure that I did it rightly.  I searched for a query similar to mine posted here and I found the one  given below but unfortunately the question has not been answered by anyone.
The frequencies for each cell are as follows: single= 65, Married/widowed/divorced-having children= 50, Married/widowed/divorced-without children= 19
I need your suggestions.

http://spssx-discussion.1045642.n5.nabble.com/orthogonal-coding-with-unequal-n-tp1076217.html
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Maguin, Eugene
I re-read the contrast coding section in Cohen (1983) who has a detailed work-through of different coding schemes. He says that with equal cell Ns, the correlations among the contrast variables will be 0.0 but will not be 0.0 if cell Ns are unequal. However, the B (unstandardized coefficient) values are adjusted for the correlations between the contrast variables. The B values (and its standard error) are what you need to know for the significance of the contrast terms. The answer is No, do not multiply the contrast coefficient values by the corresponding cell N.
Gene Maguin


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Sidra
Sent: Tuesday, October 18, 2016 11:11 PM
To: [hidden email]
Subject: contrast (orthogonal) coding with unequal cell frequencies

Hi Friends,
 I made a post on this forum a few days back relating to use of categorical variables in multiple regression analysis. I was suggested to create contrast groups to overcome the issue I was facing. I have created two contrast variables for a categorical variable with three levels.

Variable levels/categories are:
1-single,  2-married/widowed/divorced- with children,
3-married/widowed/divorced- without children

 I created following two contrast variables(as I was suggested)

category levels      single       mwd-having children          mwd-without
children


Contrast 1              -2                +1                              +1

Contrast 2               0                +1                              
-1
 
Now the issue is while I was brushing up on my knowledge of contrast coding, I read that categories/levels with unequal size (n) should be adjusted by multiplying each code with the number of observations for the corresponding cell. But  I'm not really sure how to do it exactly and even after I have done it, how to make sure that I did it rightly.  I searched for a query similar to mine posted here and I found the one  given below but unfortunately the question has not been answered by anyone.
The frequencies for each cell are as follows: single= 65, Married/widowed/divorced-having children= 50, Married/widowed/divorced-without children= 19 I need your suggestions.

http://spssx-discussion.1045642.n5.nabble.com/orthogonal-coding-with-unequal-n-tp1076217.html
<http://spssx-discussion.1045642.n5.nabble.com/orthogonal-coding-with-unequal-n-tp1076217.html>  



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/contrast-orthogonal-coding-with-unequal-cell-frequencies-tp5733307.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: contrast (orthogonal) coding with unequal cell frequencies

Sidra
OK. Thanks Eugene but Just to be sure, do I need to run the multiple regression with coding scheme you specified before? This is what you are implying, right?
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Maguin, Eugene
Yes. That coding scheme represents the contrasts I understood you to be interested in. Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Sidra
Sent: Wednesday, October 19, 2016 9:46 AM
To: [hidden email]
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies

OK. Thanks Eugene but Just to be sure, do I need to run the multiple regression with coding scheme you specified before? This is what you are implying, right?



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/contrast-orthogonal-coding-with-unequal-cell-frequencies-tp5733307p5733310.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: contrast (orthogonal) coding with unequal cell frequencies

Sidra
Thanks Gene. you have been a great help indeed.
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Rich Ulrich
In reply to this post by Maguin, Eugene

First. Let me say that I do not remember ever using the exact, adjusted coefficients to account for Ns.


Second. The resulting coefficients will be different, at least slightly, when the contrasts correlate,

compared to when the correlation is zero -- what you get from exact weights.


When two terms are uncorrelated, the presence of absence of the second one does not affect the size

of the so-called "partial coefficients" of the other.  When they are /nearly/ uncorrelated -- which is

what you usually get with the simple coefficients from Gene -- the sizes are not affected, much.  This

is almost always "good enough".  But if your Ns are grossly different (yours are, "I don't know"), you

should look at the regression with each predictor without the other, to confirm that they aren't affecting

each other by much.


--
Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of Maguin, Eugene <[hidden email]>
Sent: Wednesday, October 19, 2016 9:38 AM
To: [hidden email]
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies
 
I re-read the contrast coding section in Cohen (1983) who has a detailed work-through of different coding schemes. He says that with equal cell Ns, the correlations among the contrast variables will be 0.0 but will not be 0.0 if cell Ns are unequal. However, the B (unstandardized coefficient) values are adjusted for the correlations between the contrast variables. The B values (and its standard error) are what you need to know for the significance of the contrast terms. The answer is No, do not multiply the contrast coefficient values by the corresponding cell N.
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: contrast (orthogonal) coding with unequal cell frequencies

Sidra
I have another query.

As I'm working through my analysis using contrast variables, I am presented with this new problem. I want to control for the confounding effect of potential confounders using 10% rule to see the adjusted effect of main predictor on outcome. The two contrast categories that were created using "contrast orthogonal coding"  were supposed to represent two variables; marital status and childbearing status. I want to see whether the aforementioned two variables are confounders. Now I'm not sure whether I have to enter both contrast variables simultaneously with main predictor in the model to see the confounding effect of marital status and childbearing status  or I can enter them separately into the model (what I was supposed to do , had I worked with original variables) to see how much change each individual variable brings in the coefficient of main predictor.

Kindly help me on this.
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Sidra
Note: To be more precise, what I want ask is whether I can treat new contrast coded variables as individual variables (to represent marital status and childbearing status)? or I have to treat them essentialiy as a pair for any analysis?
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Rich Ulrich

The big virtue of /orthogonal/ coding, using the Ns, is that the two contrasts are created as uncorrelated: which makes

them "unconfounded".  If you use that version, then the coefficients are exactly the same whether you look at one

contrast or both; the t-test will vary only to the extent that taking into account another variable will reduce the (denominator)

error term.


As I just posted, with unequal Ns, you can check to see if the simple contrasts (not using Ns) do give essentially the same outcome.

If not, then you either look at them together or discuss the mutual impact or switch to the other contrasts.


--

Rich Ulrich



From: SPSSX(r) Discussion <[hidden email]> on behalf of Sidra <[hidden email]>
Sent: Wednesday, October 19, 2016 10:29 PM
To: [hidden email]
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies
 
Note: To be more precise, what I want ask is whether I can treat new contrast
coded variables as individual variables (to represent marital status and
childbearing status)? or I have to treat them essentialiy as a pair for any
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: contrast (orthogonal) coding with unequal cell frequencies

Maguin, Eugene

Rich, I need some education about what you’re saying in your reply. That first sentence and the phrase “using the Ns”. How does using the Ns change the construction of the contrast coefficients? To be specific suppose cell Ns of 75, 40, 15 and the two contrasts being (-2, 1, 1) and (0, -1, 1).

Thanks, Gene Maguin

 

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Rich Ulrich
Sent: Thursday, October 20, 2016 1:24 AM
To: [hidden email]
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies

 

The big virtue of /orthogonal/ coding, using the Ns, is that the two contrasts are created as uncorrelated: which makes

them "unconfounded".  If you use that version, then the coefficients are exactly the same whether you look at one

contrast or both; the t-test will vary only to the extent that taking into account another variable will reduce the (denominator)

error term.

 

As I just posted, with unequal Ns, you can check to see if the simple contrasts (not using Ns) do give essentially the same outcome.

If not, then you either look at them together or discuss the mutual impact or switch to the other contrasts.

 

--

Rich Ulrich

 


From: SPSSX(r) Discussion <[hidden email]> on behalf of Sidra <[hidden email]>
Sent: Wednesday, October 19, 2016 10:29 PM
To:
[hidden email]
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies

 

Note: To be more precise, what I want ask is whether I can treat new contrast
coded variables as individual variables (to represent marital status and
childbearing status)? or I have to treat them essentialiy as a pair for any
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

===================== 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: contrast (orthogonal) coding with unequal cell frequencies

Maguin, Eugene
In reply to this post by Sidra
Sidra, what is the 10% rule?  Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Sidra
Sent: Wednesday, October 19, 2016 9:59 PM
To: [hidden email]
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies

I have another query.

As I'm working through my analysis using contrast variables, I am presented with this new problem. I want to control for the confounding effect of potential confounders using 10% rule to see the adjusted effect of main predictor on outcome. The two contrast categories that were created using "contrast orthogonal coding"  were supposed to represent two variables; marital status and childbearing status. I want to see whether the aforementioned two variables are confounders. Now I'm not sure whether I have to enter both contrast variables simultaneously with main predictor in the model to see the confounding effect of marital status and childbearing status  or I can enter them separately into the model (what I was supposed to do , had I worked with original variables) to see how much change each individual variable brings in the coefficient of main predictor.

Kindly help me on this.



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/contrast-orthogonal-coding-with-unequal-cell-frequencies-tp5733307p5733323.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: contrast (orthogonal) coding with unequal cell frequencies

Bruce Weaver
Administrator
In reply to this post by Maguin, Eugene
I haven't had time to follow this thread closely, but perhaps this note by Dave Howell is relevant?

http://www.uvm.edu/~dhowell/methods7/Errata/Unequal_n's_contrasts.html



Maguin, Eugene wrote
Rich, I need some education about what you're saying in your reply. That first sentence and the phrase "using the Ns". How does using the Ns change the construction of the contrast coefficients? To be specific suppose cell Ns of 75, 40, 15 and the two contrasts being (-2, 1, 1) and (0, -1, 1).
Thanks, Gene Maguin






From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Rich Ulrich
Sent: Thursday, October 20, 2016 1:24 AM
To: [hidden email]
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies


The big virtue of /orthogonal/ coding, using the Ns, is that the two contrasts are created as uncorrelated: which makes

them "unconfounded".  If you use that version, then the coefficients are exactly the same whether you look at one

contrast or both; the t-test will vary only to the extent that taking into account another variable will reduce the (denominator)

error term.



As I just posted, with unequal Ns, you can check to see if the simple contrasts (not using Ns) do give essentially the same outcome.

If not, then you either look at them together or discuss the mutual impact or switch to the other contrasts.



--

Rich Ulrich

________________________________
From: SPSSX(r) Discussion <[hidden email]<mailto:[hidden email]>> on behalf of Sidra <[hidden email]<mailto:[hidden email]>>
Sent: Wednesday, October 19, 2016 10:29 PM
To: [hidden email]<mailto:[hidden email]>
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies

Note: To be more precise, what I want ask is whether I can treat new contrast
coded variables as individual variables (to represent marital status and
childbearing status)? or I have to treat them essentialiy as a pair for any
analysis?
===================== 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: contrast (orthogonal) coding with unequal cell frequencies

Sidra
This post was updated on .
I'm sorry fellows, I do not have a background of statistics ..that's why I'm having a hard time understanding your suggestions here. Perhaps I need to be a little bot more comprehensive.
 
I have IVs of nursing specialty,  qualification, age, years of experience, work shift, marital status and childberaing status; dependent variable being perceived stress by nurses. I need to see the effect of nursing specialty (as main variable of interest) on perceived stress while controlled for confounders.
I will identify confounders by noting crude coefficient of nursing specialty and then noticing the change in its coefficient when each IV is placed in the model with nursing specialty (one variable at a time). If adding a variable in regression model brings a change of more than 10% in coefficient of nursing specialty, I ll treat that variable as a confounder. Since to find out if a variable is a confounder, I have to put that confounder alone along with nursing specialty in regression model, I am not sure if I can treat contrast 1 and contrast 2 (in place of marital status and childbearing status) as individual variables to see how much change each brings about in the coefficient of nursing specialty separately.

I hope I have made myself sufficiently clear. Please bear with me and offer your kind insight on this problem.
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Mike
In reply to this post by Maguin, Eugene
Rich can speak for himself but I think that he means that
the orthogonal contrast (OC) for the three groups would look
something like this:
 
----------OC1__________OC2
Group1 (75*-2)= -150     (75*0)=0
Group2 (40*1)= 40          (40*-1)= -40
Group3 (15*1)=  15         (15*1)= 15
 
Elazar Pedhazur cover this situation and compare the use
of orthogonal coefficients with one-way ANOVA in the
following:
 
Pedhazur, E. J. (1997). Multiple regression in behavioral
research: Explanation and prediction. Fort Worth: Harcourt
Brace College Publishers.
 
See Chapter 11. A Categorical Independent Variable:
Dummy, Effect, and Orthogonal Coding.
 
Page 401-406 cover orthogonal coding with unequal sample
sizes..
 
If I am wrong, I'm sure I will be corrected.
 
-Mike Palij
New York University
 
 
----- Original Message -----
Sent: Thursday, October 20, 2016 8:56 AM
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies

Rich, I need some education about what you’re saying in your reply. That first sentence and the phrase “using the Ns”. How does using the Ns change the construction of the contrast coefficients? To be specific suppose cell Ns of 75, 40, 15 and the two contrasts being (-2, 1, 1) and (0, -1, 1).

Thanks, Gene Maguin

 

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Rich Ulrich
Sent: Thursday, October 20, 2016 1:24 AM
To: [hidden email]
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies

 

The big virtue of /orthogonal/ coding, using the Ns, is that the two contrasts are created as uncorrelated: which makes

them "unconfounded".  If you use that version, then the coefficients are exactly the same whether you look at one

contrast or both; the t-test will vary only to the extent that taking into account another variable will reduce the (denominator)

error term.

 

As I just posted, with unequal Ns, you can check to see if the simple contrasts (not using Ns) do give essentially the same outcome.

If not, then you either look at them together or discuss the mutual impact or switch to the other contrasts.

 

--

Rich Ulrich

 


From: SPSSX(r) Discussion <[hidden email]> on behalf of Sidra <[hidden email]>
Sent: Wednesday, October 19, 2016 10:29 PM
To:
[hidden email]
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies

 

Note: To be more precise, what I want ask is whether I can treat new contrast
coded variables as individual variables (to represent marital status and
childbearing status)? or I have to treat them essentialiy as a pair for any
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

===================== 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: contrast (orthogonal) coding with unequal cell frequencies

Sidra
In reply to this post by Sidra
From Rich's comment I'm am getting this impression that my be my previous comment has been taken to mean that I'm interested in noting the confounding effect of two contrast variables on each other but that's not the case.. I need to look for the confounding effect of each of them on the association between nursing specialty (Independent variable of interest) and criterion "perceived stress".
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Kirill Orlov
In reply to this post by Sidra
Are you speaking in your initial question about contrast coefficients (coefficients in a contrast, they sum to zero) or contrast coding (values of contrast variables)? See http://stats.stackexchange.com/a/221868/3277


20.10.2016 19:07, Sidra пишет:
I'm sorry fellows, I do not have a background of statistics ..that's why I'm
having a hard time understanding your suggestions here. Perhaps I need to be
a little bot more comprehensive.
 
I have IVs of nursing specialty,  qualification, age, years of experience,
work shift, marital status and childberaing status; independent variable
being perceived stress by nurses. I need to see the effect of nursing
specialty (as main variable of interest) on perceived stress while
controlled for confounders. 
I will identify confounders by noting crude coefficient of nursing specialty
and then noticing the change in its coefficient when each IV is placed in
the model with nursing specialty (one variable at a time). If adding a
variable in regression model brings a change of more than 10% in coefficient
of nursing specialty, I ll treat that variable as a confounder. Since to
find out if a variable is a confounder, I have to put that confounder alone
along with nursing specialty in regression model, I am not sure if I can
treat contrast 1 and contrast 2 (in place of marital status and childbearing
status) as individual variables to see how much change each brings about in
the coefficient of nursing specialty separately.

I hope I have made myself sufficiently clear. Please bear with me and offer
your kind insight on this problem.


===================== 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: contrast (orthogonal) coding with unequal cell frequencies

Mike

I think that there are bigger problems here than the distinction between
contrast coefficient and contrast coding.  Let me point out what I think
IMHO are some greater problems:
 
(1) The OP calls nonexperimental variables "independent variables"
which the OP may do by convention (everyone in the area calls them
that) but from an experimental design perspective, they are not
independent variables -- the OP may want to call them"causal variables"
and provide a path diagram that shows how the causal and other
variables affect the *outcome* variable.
 
(2) Given the info below, one would think that one would look at the
correlation matrix for all of the variables to determine how all of
the variables are interrelated.  In all likelihood, all of the variables --
"causal", outcome, "confounder"/3rd variables" -- are correlated.
The concept of "confounder" is peculiar in this situation because
it doesn't seem that nurses were randomly assigned to nursing
specialty and one now wants to determine whether random assignment
worked (i.e., the nursing specialty groups are statistically equivalent
on background variables of age, years of experience, etc.).
A path diagram explicitly identifying the relationships that one expects
on a theoretical basis, would be very helpful in clearing up what
is/isn't correlated -- and don't even get started on mediation and
moderation effects.
 
(3) An alternative way of conceptualizing what the OP want to do
is think in terms of Analysis of Covariance, that is, does mean level
of perceived stress vary significantly as a function of nursing specialty
AFTER removing the effects of other variables (i.e., age, etc.).
IMHO, this puts the focus on the relationship of greatest interest.
I know that the equivalent can be done in multiple regression (indeed,
superfans of MR like Pedhazur and other prefer MR to traditional
ANOVA analyses) but then we get the situation that we're in right
now.  I think that the original question was perhaps misunderstood
because complete information was not provided and the issue of
orthogonal coding for unequal sample sizes was maybe a side issue
or even irrelevant.
 
(4) I could be wrong but it seems to me that what the OP wants
to do is a MR that enters all of the background variables first,
determine if the is a significant relationship between perceived
stress and these variables (and which ones significant), and then
enter the variable nursing specialty (categories appropriately
coded) to determine if provides a significant increase in the
variance accounted for or R^2. 
 
(5) I think it may become relevant to ask whether orthogonal coding
should be used of nursing specialty categories because I don't think
it likely that N for all specialties are equal.  The situation is complicated
by background variables since it is likely that nursing specialty
will differ on some/all of the background variables. Again, I think
this is made clearer from an ANCOVA perspective but I'm
sure that folks who think in regression terms will disagree.
 
(6) I could be wrong (probably am) but maybe the following
analysis should be conducted:  regress perceived stress on all
of the background variables and if there is a significant relationship,
save the residuals or studentized residuals, transform them to
perceived stress scores by adding the original mean and multiplying
by the original standard deviation, and then regress these new
scores on an orthogonal contrast representing nursing specialty.
The new stress scores should represent the variance that remains
after the effects of background variables have been removed
(explicitly) and one can ask if there is any relationship between
them and the coding for nursing specialty.. 
 
(7) Does anyone think that generating propensity scores for the
background variables for the regression of perceived stress on
nursing specialty categories might be an alternative analysis to
consider?
 
(8) Does anyone wonder if a single nurse might report having
multiple specialties?  If so, how is this represented in the data?
 
(9) My understanding of the OP's situation could be completely
wrong, so feel free to ignore everything I said above.  But I do
think that maybe we have been focusing on the wrong issues.
 
-Mike Palij
New York University
 
 
----- Original Message -----
Sent: Thursday, October 20, 2016 12:36 PM
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies

Are you speaking in your initial question about contrast coefficients (coefficients in a contrast, they sum to zero) or contrast coding (values of contrast variables)? See http://stats.stackexchange.com/a/221868/3277


20.10.2016 19:07, Sidra пишет:
I'm sorry fellows, I do not have a background of statistics ..that's why I'm
having a hard time understanding your suggestions here. Perhaps I need to be
a little bot more comprehensive.
 
I have IVs of nursing specialty,  qualification, age, years of experience,
work shift, marital status and childberaing status; independent variable
being perceived stress by nurses. I need to see the effect of nursing
specialty (as main variable of interest) on perceived stress while
controlled for confounders. 
I will identify confounders by noting crude coefficient of nursing specialty
and then noticing the change in its coefficient when each IV is placed in
the model with nursing specialty (one variable at a time). If adding a
variable in regression model brings a change of more than 10% in coefficient
of nursing specialty, I ll treat that variable as a confounder. Since to
find out if a variable is a confounder, I have to put that confounder alone
along with nursing specialty in regression model, I am not sure if I can
treat contrast 1 and contrast 2 (in place of marital status and childbearing
status) as individual variables to see how much change each brings about in
the coefficient of nursing specialty separately.

I hope I have made myself sufficiently clear. Please bear with me and offer
your kind insight on this problem.

===================== 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: contrast (orthogonal) coding with unequal cell frequencies

Art Kendall

How fine grained is the perceived stress variable?  I.e, how many values occur in a frequency count?

How many cases are there? This seems like it would be a very complex model, is there enough power?

Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Sidra
No, I don't think it's a very complex model. The perceived stress was measured on 5 point likert type scale consisting of 14 items.  A mean score of perceived stress for each case and nursing specialty (type of nurse: medical vs psychiatric was calculated). In bivariate analysis (using t-test) i found significant difference between mean stress scores of the two nursing strata. I want to see if the difference is still significant while controlled for confounders (using multiple regression).
I'm  not interested in seeing causal effect of any variable on outcome rather just association.
I have another outcome variable(DCL stress score) which consists of five factors(domains) measured the same way as "perceived stress". These five domains will be treated as individual variables and will be tested for their association with nursing specialty using the same method I' ll use for the first outcome "perceived stress".
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Ryan
In reply to this post by Bruce Weaver
I'd just note that these types of contrasts can easily be accomplished using the TEST statement in MIXED.

Ryan

On Thu, Oct 20, 2016 at 10:48 AM, Bruce Weaver <[hidden email]> wrote:
I haven't had time to follow this thread closely, but perhaps this note by
Dave Howell is relevant?

http://www.uvm.edu/~dhowell/methods7/Errata/Unequal_n's_contrasts.html




Maguin, Eugene wrote
> Rich, I need some education about what you're saying in your reply. That
> first sentence and the phrase "using the Ns". How does using the Ns change
> the construction of the contrast coefficients? To be specific suppose cell
> Ns of 75, 40, 15 and the two contrasts being (-2, 1, 1) and (0, -1, 1).
> Thanks, Gene Maguin
>
>
>
>
>
>
> From: SPSSX(r) Discussion [mailto:

> SPSSX-L@.UGA

> ] On Behalf Of Rich Ulrich
> Sent: Thursday, October 20, 2016 1:24 AM
> To:

> SPSSX-L@.UGA

> Subject: Re: contrast (orthogonal) coding with unequal cell frequencies
>
>
> The big virtue of /orthogonal/ coding, using the Ns, is that the two
> contrasts are created as uncorrelated: which makes
>
> them "unconfounded".  If you use that version, then the coefficients are
> exactly the same whether you look at one
>
> contrast or both; the t-test will vary only to the extent that taking into
> account another variable will reduce the (denominator)
>
> error term.
>
>
>
> As I just posted, with unequal Ns, you can check to see if the simple
> contrasts (not using Ns) do give essentially the same outcome.
>
> If not, then you either look at them together or discuss the mutual impact
> or switch to the other contrasts.
>
>
>
> --
>
> Rich Ulrich
>
> ________________________________
> From: SPSSX(r) Discussion <

> SPSSX-L@.UGA

> <mailto:

> SPSSX-L@.UGA

> >> on behalf of Sidra <

> sidrarashid85@

> <mailto:

> sidrarashid85@

> >>
> Sent: Wednesday, October 19, 2016 10:29 PM
> To:

> SPSSX-L@.UGA

> <mailto:

> SPSSX-L@.UGA

> >
> Subject: Re: contrast (orthogonal) coding with unequal cell frequencies
>
> Note: To be more precise, what I want ask is whether I can treat new
> contrast
> coded variables as individual variables (to represent marital status and
> childbearing status)? or I have to treat them essentialiy as a pair for
> any
> analysis?
> ===================== To manage your subscription to SPSSX-L, send a
> message to

> LISTSERV@.UGA

> <mailto:

> 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
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/contrast-orthogonal-coding-with-unequal-cell-frequencies-tp5733307p5733336.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
12