Statalist


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

Re: st: Need help for chi-square test with survey command


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: Need help for chi-square test with survey command
Date   Tue, 29 Sep 2009 13:42:00 -0400

Mihir <[email protected]> :
I sincerely doubt you have 60 strata over all 10 years; you may need
http://www.hcup-us.ahrq.gov/db/nation/nis/nistrends.jsp
or an equivalent.

On Tue, Sep 29, 2009 at 1:29 PM, Mihir <[email protected]> wrote:
> Dear all:
>
> I am stuck with a problem in pearson chi-square test with survey
> command. I have setup survey setting for Nationwide Inpatient Survey
> (NIS) data. I used hospital id as sampling unit, discwt as sampling
> weight and stratum variable as strata as suggested on NIS website.
> When I am trying to run chi-square test for independence between age
> category and year of data collection from 1998 to 2007, it gives
> proper result, but when I run the same command by retaining only two
> years (1998 and 2007), it does not produce p-value. I don't understand
> why it is happening? Can anybody help me - what I should do? I am also
> getting similar results with other variables that same command works
> with more year but doesn't work with two years.
>
> I have pasted my output for your ready reference.
>
> Thanking you in advance,
> Mihir
>
> svyset hospid [pweight=discwt], strata(stratum) vce(linearized)
>
>      pweight: discwt
>          VCE: linearized
>     Strata 1: stratum
>         SU 1: hospid
>        FPC 1: <zero>
>
> svy: tabulate year age2cat, count column row obs percent format(%10.0g) pearson
> (running tabulate on estimation sample)
>
> Number of strata   =        60                  Number of obs      =    157222
> Number of PSUs     =      3270                  Population size    = 759816.12
>                                                Design df          =      3210

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index