Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: SAS proc format and regression


From   "Zhehui Luo" <[email protected]>
To   [email protected]
Subject   st: SAS proc format and regression
Date   Thu, 08 Jul 2004 12:22:01 -0400

Hi,
In SAS, we can use proc format to change label value, for example, school is the years of schooling, which ranges 0 to 17. We can use:
proc format;
value school low-<12='<12' 12-high='12+';
run;
later in regression we can use the format so that school is inlucded as a dummy variable:
proc logistic;
class school;
model y=school;
format school school.;
run;
How do we achieve the same goal in Stata without creating new variables? I thought we could use label define and label value, but it didn't work.
Thanks a lot,

Zhehui

*
* 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