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

From |
"Kieran McCaul" <kamccaul@meddent.uwa.edu.au> |

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

Subject |
RE: st: Test for trend in surveys |

Date |
Fri, 3 Oct 2008 05:02:58 +0800 |

I remember years ago, before any of the survey commands existed in Stata, I had some cluster-sampled survey data to analyse. I had to use SUDAAN, but I found that if I simply wanted the 95%CI around a proportion I could use Stata's -regress- with the -cluster- and robust options. I just fitted the binary variable as the dependent with no covariates and used pweights. The constant term in this model would be the correct proportion and the 95%CI around this would be the correct 95%CI. I could verify this with SUDAAN. ______________________________________________ Kieran McCaul MPH PhD WA Centre for Health & Ageing (M573) University of Western Australia Level 6, Ainslie House 48 Murray St Perth 6000 Phone: (08) 9224-2140 Fax: (08) 9224 8009 email: kamccaul@meddent.uwa.edu.au http://myprofile.cos.com/mccaul _______________________________________________ The fact that no one understands you doesn't make you an artist. -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of 聲gel Rodr璲uez Laso Sent: Thursday, 2 October 2008 3:08 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: Test for trend in surveys Thanks all for your answers. When I wrote 'of type Pearson chi-squared' I didn't want to mean that it was specifically chi-squared, but that it was of the type that could be obtained as an option when performing a plain frequency analysis, without having to carry out regressions. Steve's proposal makes me a little bit nervous: I was taught that using O.L.S. regression for a binary response is inadequate, but I suppose there are exceptions. Angel Rodriguez-Laso 2008/10/2 Steven Samuels <sjhsamuels@earthlink.net>: >>> >>> >> > There is, to my knowledge, no such thing as test for trend of type Pearson > chi-squared. I suspect that 聲gel is referring to the Cochran-Armitage test > one degree-of-freedom chi square test for trend (A. Agresti, 2002, > Categorical Data Analysis, 2nd Ed. Wiley Books, Section 5.3.5). > > Let Y be the 0-1 binary outcome variable and X be the variable which > contains category scores. One survey-enabled approach is Phil's suggestion: > use -svy: logit-. > > However -svy: reg- will produce a result closer to that of the > Cochran-Armitage test. Why? The Cochran-Armitage test statistic is formally > equivalent to an O.L.S. regression of Y on X, with a standard error for > beta which substitutes the total variance for the residual variance. The > statistic is (beta/se)^2. The total variance is equal to P(1-P), where P is > the overall sample proportion. In other words, the standard error is > computed under the null hypothesis of equal proportions. > > The -svy: reg- command will estimate the same regression coefficient, but > with a standard error that is robust to heterogeneity in proportions. In > both survey-enabled commands, t = (b/se) has a t distribution with degrees > of freedom (d.f.) based on the survey design; t^2 has an F(1, d.f.) > distribution. > > > -Steve > >>> >>> On Sep 30, 2008, at 6:39 AM, Philip Ryan wrote: >>> >>> Well, the z statistic testing the coefficient on the exposure variable is >>> as >>> valid and as useful a summary (test) statistic as the chi-square >>> statistic >>> produced by a test of trend in tables. If you prefer chi-squares, you >>> could >>> just square the z statistic to get the chi-square on 1 df. And if you >>> prefer >>> likelihood ratio chi-squares to the Wald z (or Wald chi-square) then the >>> modelling approach can deliver that also. >>> >>> Phil >>> >>> Quoting 聲gel Rodr璲uez Laso <angelrlaso@gmail.com>: >>> >>> Thanks to Philip and Neil for their advice. >>> >>> Philip's proposal is absolutely compatible with survey data, but I was >>> interested in a summary statistic of the type of Pearson chi-squared. >>> >>> To this respect, Neil puts forward a test (nptrend) that would be >>> perfect if it allowed complex survey specifications. I believe strata >>> and clusters are not important because the formula for the standard >>> error of this nonparametric test (see Stata Reference Manual K-Q page >>> 338) should not be affected by these specifications. But nptrend does >>> not accept weights as an option, what I think makes it unsuitable for >>> complex survey analyses. >>> >>> Angel Rodriguez Laso >>> >>> 2008/9/29 Philip Ryan <philip.ryan@adelaide.edu.au>: >>> >>> For a 2 x k table [with a k-category "exposure" variable] just set up a >>> logistic >>> dose-response model: >>> >>> svyset <whatever> >>> svy: logistic <binary outcome var> <exposure var> >>> >>> and check the coefficient of <exposure var>, along with its confidence >>> interval >>> and P-value. >>> >>> If you prefer a risk metric rather than odds, then use svy: glm..... with >>> appropriate link and error specifications. >>> >>> Phil >>> >>> >>> Quoting 聲gel Rodr璲uez Laso <angelrlaso@gmail.com>: >>> >>> Dear Statalisters, >>> >>> Is there a way to carry out a test for trend in a two-way table in >>> survey analysis in Stata? >>> >>> Many thanks. >>> >>> Angel Rodriguez Laso >>> * >>> *-- > > * > * 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/

**References**:**Re: st: Test for trend in surveys***From:*Steven Samuels <sjhsamuels@earthlink.net>

**Re: st: Test for trend in surveys***From:*"聲gel Rodr璲uez Laso" <angelrlaso@gmail.com>

- Prev by Date:
**Re: st: Best laptop specifications to run version 9.0 and 10** - Next by Date:
**Re: st: comment out a number of lines together** - Previous by thread:
**Re: st: Test for trend in surveys** - Next by thread:
**RE: st: graph bar and/or catplot** - Index(es):

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