Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: test for trend with svy commands?


From   "Melissa D. A. Carlson" <[email protected]>
To   <[email protected]>
Subject   RE: st: test for trend with svy commands?
Date   Thu, 21 Oct 2004 16:29:56 -0400

Also, wouldn't I do svylogit instead of svyreg since my outcome is binary
(0,1)?

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Stas Kolenikov
Sent: Thursday, October 21, 2004 1:52 PM
To: [email protected]
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
<[email protected]> 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/



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