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   Mihir <mihir.statistics@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Need help for chi-square test with survey command
Date   Wed, 30 Sep 2009 01:48:36 +0800

Hi Austin,

Thanks for your prompt reply. I have selected the records as per my
inclusion - exclusion criteria. Hence, my data does not contain whole
NIS database.

Regards,
Mihir

On Wed, Sep 30, 2009 at 1:42 AM, Austin Nichols <austinnichols@gmail.com> wrote:
> Mihir <mihir.statistics@gmail.com> :
> 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 <mihir.statistics@gmail.com> 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/
>

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