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
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Sidra
Thanks for such a detailed answer but I'm more confused now than before. Well, let me respond to some of the parts that I understood from your comment.

1) Nursing specialty simply represents type of nurse(depending on which type of ward a nurse is employed in), basically I collected data from only two types of nurses, one working in a psychiatric hospital (and thus categorized as psychiatric nurse) and all other nurses who working in medical wards of general hospitals were categorized as medical nurses (I used convenience sampling, if that's of any concern). The two categories are mutually exclusive.

2) It seems you got off on the wrong foot while interpreting my previous posts. It's not the nursing specialty that was contrast coded rather it was two variables, marital status and childbearing status that were contrast coded (The prime purpose of coding was to deal with an N/A response category for childbearing status,  that has been discussed in a previous post by me and to which Eugene Maguin responded and I followed his instructions to create two contrast groups).

3) N for the three groups that have been contrasted coded isn't equal. The three groups are single (n=65), married with children (50) and married without children (19).

4)Sorry for using the term "independent variable" loosely (I thought my detailed description was enough to make up for such unintended mistakes). The background variables are being treated as predictor variables. I'm not interested in causal effects.
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

Gene,

I'm distinguishing between two ways of setting up contrasts:

  The so-called "weighted" ANOVA uses equal weights per group, like (-2, 1, 1).

  The so-called "unweighted" ANOVA incorporates the Ns.
For unequal group sizes, you need to incorporate the Ns if you want zero intercorrelation.

I am /not/ saying how to compute the new coefficients. I forget if multiplying by Ns is what works;
but the book-formulas are more complicated, at least because they re-scale.  If your coefficients
are really big, then the b's will be really small (if you try to look at them), and might round off to
zero in (say) the default presentation of a regression

--
Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of Maguin, Eugene <[hidden email]>
Sent: Thursday, October 20, 2016 8:56 AM
To: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Rich Ulrich

"weighted" vs "unweighted"  - Bruce points out to me that I have labeled them backwards.

Giving each group an equal weight is the "unweighted" analysis.  I suppose I can try to

remember them, in the future, by recalling that for the folks doing the analyses by hand,

the simple way (pretending equal Ns, assigning equal weights) would not need extra weighting.


Sorry.  I know that the names are confusing, and that is why I try to avoid using them.

My old, handy-dandy mental cue, "the one that seems to be wrong is right", was bound to fail eventually.


--

Rich Ulrich


From: Rich Ulrich <[hidden email]>
Sent: Friday, October 21, 2016 12:38:30 PM
To: [hidden email]; Maguin, Eugene
Subject: Re: contrast (orthogonal) coding with unequal cell frequencies
 

Gene,

I'm distinguishing between two ways of setting up contrasts:

  The so-called "weighted" ANOVA uses equal weights per group, like (-2, 1, 1).

  The so-called "unweighted" ANOVA incorporates the Ns.
For unequal group sizes, you need to incorporate the Ns if you want zero intercorrelation.

I am /not/ saying how to compute the new coefficients. I forget if multiplying by Ns is what works;
but the book-formulas are more complicated, at least because they re-scale.  If your coefficients
are really big, then the b's will be really small (if you try to look at them), and might round off to
zero in (say) the default presentation of a regression

--
Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of Maguin, Eugene <[hidden email]>
Sent: Thursday, October 20, 2016 8:56 AM
To: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: contrast (orthogonal) coding with unequal cell frequencies

Art Kendall
In reply to this post by Sidra
The SO WHAT test: What size difference on the stress variables or on fit  is meaningful in terms of understanding/policy/practice?


Am I correct in thinking you have 134 cases?

With regard to the complexity of the model relative to the number of cases.

If you do a "kitchen sink" model, how many predictor variables are in the equation?
How many cells are there in a multiple way crosstab of the categorical predictors? This may give you clues on combining/collapsing categories.



For consideration by yourself and the list.

Since you appear to be generating hypotheses rather than testing them, try fitting sets of variables in "steps". [This is not "stepwise" regression, rather it is hierarchical steps.]
First, all the other predictor variables, then look at the change in r**2 when you put specialty in on a second step.  (Or just look at "variables not in the equation"). Apply the SO WHAT test to the size of the change.

In another run,
First, enter specialty, then look at the change in r**2 when you enter the whole set of other predictors. Then apply the SO WHAT test to the size of the change.
You may get some idea on what to explore in future studies by looking at the variables not in the equation before you do the second step. Apply the SO WHAT test to the change size  results for each of the variables not in the equation.  Possibly you will see some possible ways it would make sense to generate interaction hypotheses for your next study.


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

Re: contrast (orthogonal) coding with unequal cell frequencies

Art Kendall
In reply to this post by Art Kendall
In addition, how reliable are your stress measures?

Roughly the upper limit of valid variance is the consistent variance.  You need to take that into account when you evaluate the fit of your regressions.

Are there internal consistency alphas from previous larger scale studies?

For the instrument that has several measures, is the scoring key such that any item is used in only one scale, or are there artifactual correlations among the measures?
Art Kendall
Social Research Consultants
12