Date: Thu, 20 Oct 2011 14:04:05 -0500
Reply-To: "jonaitis@wisc.edu" <jonaitis@wisc.edu>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Erin McMullen Jonaitis <jonaitis@WISC.EDU>
Organization: WAI
Subject: Re: proc mixed contrast statement
In-Reply-To: <6962F1148BAD5144A2038B47CFAB449D46AB6F635F@EXCHMB02.occ.treas.gov>
Content-type: text/plain; CHARSET=US-ASCII
Thanks for the reply, Desiree!
I realize now I spoke sloppily in my last post -- sorry about that. What I really want is not estimates for all four levels of education, but rather, estimates of the value added by jumping up a particular level. That is, I want to compare:
Everyone who has at least an AA to everyone who doesn't
Everyone who has at least a BA to everyone who doesn't
Everyone who has at least an MA to everyone who doesn't
The main impetus for this came when I looked at the dummy code output and thought, what on earth does it mean to compare someone with an MA to someone with only a HS diploma? So much differs between those groups that it seemed like a senseless comparison to me.
You're right that I would wind up with a less-than-full-rank model if I were also trying to estimate the effect of having only a high school diploma. I hadn't thought about /noint, so thanks for the reminder; I don't think that really captures the question I'm after, unfortunately.
Erin
-----Original Message-----
From: Schaan, Desiree [mailto:Desiree.Schaan@occ.treas.gov]
Sent: Thursday, October 20, 2011 1:49 PM
To: 'jonaitis@wisc.edu'; SAS-L@LISTSERV.UGA.EDU
Subject: RE: proc mixed contrast statement
A couple of suggestions.
1. You said: "My favorite solution would be one that allows me to get beta estimates for each of the levels of education" - you can do this by using the class statement combined with noint option in your model statement.
2. Instead of using contrast statements to check your results, use estimate statements. I think that your contrast statements are not even estimating the correct effect - and that this is why your p-values are off.
If these steps don't help you figure out what is going on, it would be helpful to see the output from the model where you use the class statement.
I really don't see anything fundamentally wrong with your model. It is just that by including both the intercept and class variables, you have an "X" matrix will less than full rank.
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Erin McMullen Jonaitis
Sent: Thursday, October 20, 2011 1:58 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: proc mixed contrast statement
Thanks for your fast reply, Paul. I'm not totally sure I follow -- I know that the indicator codes aren't orthogonal, but neither are the contrasts I set up, so I don't understand why the results aren't the same. It was my impression that orthogonality was desirable, but not mathematically necessary.
I should also note, all the other results (in my larger model with more variables) are the same in either parametrization -- model R^2 and the value of all other coefficients. Steve posited unequal residual variance; as that depends only on my outcome (identical across models) and R^2 (identical across models), I don't think that's the crux of it.
The linearity suggestion is one I could follow, but it seems to me a slight disservice to the data -- I'm not sure we have reason to assume anything beyond ordinality here. My favorite solution would be one that allows me to get beta estimates for each of the levels of education; second best, I think, would be to stick with the default dummy coding and not report betas (as I find them hard to interpret in the dummy context).
I appreciate the suggestions, but am still puzzled!
Erin
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Swank, Paul R
Sent: Thursday, October 20, 2011 11:35 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: proc mixed contrast statement
Your indicator coded variables are not orthogonal and so do not account for all the variability in education so your error term is different between the models. Seems to me you might be interested in whether the change in education levels was relatively linear. You could test this with a linear, quadratic and cubic contrast of education.
Paul
Dr. Paul R. Swank,
Children's Learning Institute
Professor, Department of Pediatrics, Medical School Adjunct Professor, School of Public Health University of Texas Health Science Center-Houston
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Erin McMullen Jonaitis
Sent: Thursday, October 20, 2011 10:06 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: proc mixed contrast statement
I'm sorry, I misspoke here -- the last line should be Contrast "MA" ed -1 -1 -1 3.
The other was a typo and is not the error!
Erin
-----Original Message-----
From: Erin McMullen Jonaitis [mailto:jonaitis@wisc.edu]
Sent: Thursday, October 20, 2011 10:03 AM
To: 'SAS-L@listserv.uga.edu'
Subject: proc mixed contrast statement
Hi all,
I'm having trouble with some contrasts and I suspect I'm making an elementary error -- advice would be appreciated. I am using Proc Mixed to run these models, but a stripped-down version in Proc GLM gave me the same problem, so it's not an artifact of model complexity.
I have a category variable with a natural ordering -- level of education. Normal dummy coding would class each person by terminal degree and compare each group against some reference group (say, those with no degree at all), but that seems not very useful to me, as a more natural question is "what is the value added by each degree, compared to the reference state of not having it?" So I have instead been parameterizing my model as follows:
Let ed = {1,2,3,4} (representing HS, associate's, bachelor's, and master's, respectively)
And ed_aa = 1 if ed >= 2, 0 otherwise
ed_ba = 1 if ed >= 3, 0 otherwise
ed_ma = 1 if ed = 4, 0 otherwise
Then I set up my model something like this: outcome = ed_aa ed_ba ed_ma.
As a sanity check, I compared this to a model that includes ed as a class variable (i.e., outcome = ed, preceded by a class statement), and then added contrast statements like so:
contrast "AA" ed -3 1 1 1
contrast "BA" ed -1 -1 1 1
contrast "MA" ed -3 1 1 1
And then checked the p-value, expecting them to be the same (since in my mind, both approaches are comparing groups across three successive thresholds). However, the p-values are not the same -- which suggests one or the other of my conceptualizations is wrong here. Can anyone spot my mistake?
Erin Jonaitis, Ph.D.
Assistant Scientist, Wisconsin Alzheimer's Institute
7818 Big Sky Drive
Madison, WI 53719