Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: RE: Unordered Categorical Predictor Variable
From
louis grandjean <[email protected]>
To
[email protected]
Subject
Re: st: RE: Unordered Categorical Predictor Variable
Date
Fri, 25 Jan 2013 10:19:39 -0500
Dear All,
Thank you all so much for replying.
Just to clarify even more in case it helps:
My binary outcome is: Drug Resistant or Not Drug Resistant
One of my predictor variables is: Bacterial Family which has 10
categories/levels
There are other predictor variables in the model too.
The question I want to answer is: Is one bacterial family more likely
to be drug resistant when compared to the others. But if possible I
want to know this for all the bacterial families in the model.
Deviation coding gives me the answer to the question is one bacterial
family more drug resistant when compared to all the families
(including itself) but this isn't quite what I want to do.
Best wishes Louis
On 24 January 2013 18:48, Lachenbruch, Peter
<[email protected]> wrote:
> i may be missing the point here, but why cant you use the factor variable coding (i.varname) you can vary the base variable. See factor variable in manual. comparing all possible factor codings doesn't make much sense since they will be dependent, and you can use contrasts for whatever you want.
>
> Peter A. Lachenbruch,
> Professor (retired)
> ________________________________________
> From: [email protected] [[email protected]] on behalf of louis grandjean [[email protected]]
> Sent: Thursday, January 24, 2013 7:08 AM
> To: [email protected]
> Subject: st: Unordered Categorical Predictor Variable
>
> Dear Statalist,
>
> I'm using Stata 11 and am struggling with how to best analyse an
> unordered categorical predictor in a logistic regression.
>
> My categorical predictor is "bacterial family" so it doesn't make
> sense to always compare one family to an arbitrarily chosen reference
> family. What I want to do is compare each family in turn to all the
> other families.
>
> I think deviation coding would give me one family vs the mean of all
> the families, but I want to get one family vs the other famlies, and
> obtain an odds ratio for each level.
>
> I've looked at xi3 but this doesn't seem to answer the problem.
>
> I'd be very grateful for your thoughts.
>
> Best wishes Louis
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/