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

st: RE: Tab, chi2 using weights


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Tab, chi2 using weights
Date   Mon, 10 May 2004 19:19:20 +0100

I guess that you're going to have to program 
this yourself, taking responsibility for 
how you calculate df and thus P-value. 
As it happens, it seems that -chi2tail()- 
works as one would hope for non-integer df. 

Or would a log-linear model with 
importance weights be equivalent 
for your underlying scientific problem? 

Nick 
[email protected] 

Pierre-Antoine Kremp
 
> I'm using a dataset with "importance weights": frequency weights
> multiplied by the sampling rate n/N -- so that the sum of those
> importance weights equals the sample size n, not the target population
> size N) and I'd like to do a Pearson chi-squared test on a 2-way
> contingency table. It shouldn't be too hard, but the chi2 
> option of the
> tab command doesn't accept iweights. Only integer frequency 
> weights seem
> to be allowed. I could very well use frequency weights 
> instead, but that
> would increase the Chi2 stat unreasonably.
> 
> Any idea on how to get round this problem?
> 
> Thanks a lot (and sorry if the question is too trivial!)

*
*   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