[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Karem Harth <karem.harth@hsc.stonybrook.edu> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: Stratifying medians |

Date |
Thu, 27 Nov 2008 21:17:37 -0500 |

I need to stratify medians by the outcome and get the percentiles, what is the syntax for this? I have a term "weight" which is a continuous variable Outcome is categorical (treatment/no treatment) Weight is not normally distributed I wanted to make a table with the median weight of tissue for those who received treatment and those who did not... Thanks! karem On 11/27/08 8:46 PM, "Kit Baum" <baum@bc.edu> wrote: > < > > Mandy said > > 1) In step 3. above I replace the incorrect commands with the correct > ones, and then re-run the commands to update the data sets created > 2) I append some extra commands to the existent do files to revise. > That is, the initial incorrect commands remain in the do-files. > > So do files for these two ways seem like as follows: > (1) > ------------------------------------------------ > *do file > > command after revise > ------------------------------------------------ > 2) > ------------------------------------------------ > . . . . .*do file > initial commands(Which need to revise) > .............................. > extra command to revise > ----------------------------------------------- > Which way is better? How should I decide this? This question is > important to me since it's helpful for me to get good habit of > managing data sets and do files. > > > > > Personally, if I want to keep track of what turned out to be the wrong > commands (perhaps so I don't do that the next time!) I would use a > variation on the second strategy: copy the wrong commands, comment > them out, and correct their copies. That is, don't make all the > corrections at the bottom, because that will only work if the > incorrect variables are not used in any intermediate calculations. > > I have not seen it, but with a ringing endorsement from Bill Gould at > FNASUG, the new book on "The Workflow of Data Analysis in Stata" by > Scott Long (Stata Press; see Stata's website) might be a good > investment. > > Kit Baum, Boston College Economics and DIW Berlin > http://ideas.repec.org/e/pba1.html > An Introduction to Modern Econometrics Using Stata: > http://www.stata-press.com/books/imeus.html > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/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/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE: Stratifying medians***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**References**:**st: re: keep or delete the commands which need to revise when editing do files?***From:*Kit Baum <baum@bc.edu>

- Prev by Date:
**st: re: keep or delete the commands which need to revise when editing do files?** - Next by Date:
**st: RE: Stratifying medians** - Previous by thread:
**st: re: keep or delete the commands which need to revise when editing do files?** - Next by thread:
**st: RE: Stratifying medians** - Index(es):

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