Statalist


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

st: RE: Stratifying medians


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Stratifying medians
Date   Fri, 28 Nov 2008 09:38:22 +0100

Line for the server...

***********
sysuse auto, clear
table foreign, contents(median price )
***********

HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Karem Harth
Sent: Friday, November 28, 2008 3:18 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: Stratifying medians

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/

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



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