Dear Fukugawa-Nobuya
You can add an -if- command to your regression model like
-regress y x1 x2 x3 if x4==1-
where x4 is your dummy variable (0,1).
Christine
-----Oprindelig meddelelse-----
Fra: [email protected] [mailto:[email protected]]
Sendt: 30. oktober 2003 17:01
Til: [email protected]
Emne: st: Generating subsamples according to a binary choice
Dear Statalisters,
I want to classify the sample into two parts accoding to a dichotomy
variable and apply them a same regression model.
For instance, I want to divide the sample into the subsample A where a
dummy
takes one and the subsample B where a dummy takes zero.
I do this by generating two new worksheets for subsamples A&B in
MS-Excel,
and then run a regression twice in Stata7.
How do I do these procedures using only Stata instead of generating new
worksheets in Excel?
Thank you in advance.
Nobuya Fukugawa
*
* 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/
*
* 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/