[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Melissa D. A. Carlson" <melissa.carlson@yale.edu> |

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

Subject |
RE: st: test for trend with svy commands? |

Date |
Thu, 21 Oct 2004 15:50:42 -0400 |

Thanks so much for this reply. Just a quick follow-up question: What does "sum year, mean" do? -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Stas Kolenikov Sent: Thursday, October 21, 2004 1:52 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: test for trend with svy commands? an easy thing to do is to create use the variable -year-, or better centered version of that, sum year, mean g cyear = year - r(mean) and put it into your regression svyreg male cyear If it is statistically significantly greater than zero, it means that on average the proportion of males was going up over entire period. Of course if you have non-monotone patterns, then this approach is simply wrong. More rigorously, you should have tests one by one, but two complications here are (i) that your compsite alternative is weird (male[1996] < male[1998] < male[2000] which is a cone; testing this hypothesis leads to all sorts of complications on the boundary of the admissible parameter space. I should have references on this if you are interested; they go back to Chernoff (1954) paper on testing on the boundary, and another paper on testing monotone relations on cone that I cannot seem to find in the pile of PDF files on my three computers... and complication number 2 (ii) is that your type I error goes wild in those one-by-one tests. The simplest way is to disregard all of the previous paragraph and just use the linear term :)) Stas On Thu, 21 Oct 2004 13:11:31 -0400, Melissa D. A. Carlson <melissa.carlson@yale.edu> wrote: > Can the svy commands in stata do a test for trend? I have 5 years of data > and say, for example, I want to test if the proportion of patients in my my > sample that are male has increased over the five years. I have compared the > years 2x2 (so 200 vs 1998, 1998 vs 1996, etc) using svytest and svylc but > how do I test that there is a trend in the data over the 5 years? -- Stas Kolenikov http://stas.kolenikov.name * * 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/

**References**:**Re: st: test for trend with svy commands?***From:*Stas Kolenikov <skolenik@gmail.com>

- Prev by Date:
**RE: st: test for trend with svy commands?** - Next by Date:
**Re: st: STATA Wish List, interactions** - Previous by thread:
**Re: st: test for trend with svy commands?** - Next by thread:
**RE: st: test for trend with svy commands?** - Index(es):

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