Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Logistic regression, changing order of variables


From   "Maarten Buis" <[email protected]>
To   <[email protected]>
Subject   st: RE: Logistic regression, changing order of variables
Date   Fri, 22 Jun 2007 15:47:22 +0200

--- Todd Swarthout wrote:
>  Is there a command I can use (or add to the existing command 
> -xi:logistic hiv i.age3 sexc age-) that would allow me to change 
> the order of strata during logistic analysis. That is to say,
> if I want to use the 12-17 yr strata as the point of 
> comparison...without having to create a new variable in which I
> change the coding.

It can be done with -xi-, see -help xi- under the section 
"Summary of controlling the omitted dummy". So you would type:

char age3[omit] 2
xi:logistic hiv i.age3 sexc age

I like to create my own dummies. That way I have more control 
over the reference category, any other contrast I may like, and 
the variable names. So I would prefer to do: 

gen age2_4 = age3 == 0 if age3 < .
gen age5_11 = age3 == 1 if age3 < .
logistic hiv age2_4 age5_11 sexc age

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------




*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index