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

From |
Susanne Neckermann <sneckermann@iew.uzh.ch> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: test difference in quintiles |

Date |
Wed, 10 Jun 2009 17:37:47 +0200 |

Dear T thank you very much for the message!!

Thank you so much for your input!! Best Susanne On 10-Jun-09, at 5:26 PM, Tirthankar Chakravarty wrote:

<> This is a variation of previous advice: http://www.stata.com/statalist/archive/2009-05/msg00311.html I believe you want to test the significance of the difference of the 5th percentile for two variables using a bootstrap. If this is the case, then the code below applies: /* Bootstrap the difference of percentiles */ clear webuse nlswork, clear keep idcode year ttl_exp reshape wide ttl_exp, i(idcode) j(year) cap prog drop pctile_bs program define pctile_bs, rclass version 10 syntax varlist(max=2 min=2) [if] [in] marksample touse tokenize `varlist' local first `1' macro shift local second `*' _pctile `first' if `touse', percentiles(5) scalar pc1 = r(r1) _pctile `second' if `touse', percentiles(5) scalar pc2 = r(r1) return scalar dpc = pc1-pc2 ereturn post, esample(`touse') endbootstrap Dpc = r(dpc), reps(2000) dots: pctile_bs ttl_exp68ttl_exp69/* End */ Please also see the reference about pivotal statistics in a bootstrap from the previous message. T On Wed, Jun 10, 2009 at 3:57 PM, Susanne Neckermann<sneckermann@iew.uzh.ch> wrote:Hi! I want to test whether the difference in the fifth percentile of two distributions is significant.In principle, this test should be similar to the "median" (thatsthe name ofthe command) test already implemented in Stata, but unfortunately Icannotprogram .ado files and I could not find a user-written procedure. Any idea how to go about this? P.S. the number of observations in the fifth percentile is pretty low (around 6), so one might have to use something with bootstrap or permutations. Thank you so much in advance susanne * * 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/-- To every ω-consistent recursive class κ of formulae there correspond recursive class signs r, such that neither v Gen r nor Neg(v Gen r) belongs to Flg(κ) (where v is the free variable of r). * * 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**:**AW: st: test difference in quintiles***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**References**:**Re: st: Need to Title a Second Y-Axis...***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**RE: st: Need to Title a Second Y-Axis...***From:*"Ploutz-Snyder, Robert (JSC-SK)[USRA]" <robert.ploutz-snyder-1@nasa.gov>

**st: test difference in quintiles***From:*Susanne Neckermann <sneckermann@iew.uzh.ch>

**Re: st: test difference in quintiles***From:*Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>

- Prev by Date:
**Re: st: test difference in quintiles** - Next by Date:
**AW: st: test difference in quintiles** - Previous by thread:
**Re: st: test difference in quintiles** - Next by thread:
**AW: st: test difference in quintiles** - Index(es):

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