Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Non integer weights - problem


From   "Raquel Guimaraes" <[email protected]>
To   <[email protected]>
Subject   st: Non integer weights - problem
Date   Sun, 5 Feb 2012 14:12:10 -0800

Dear all,

I had a problem using collapse and expanding my sample using frequency
weights:

. collapse (count) id [fw=wtper], by (granosest sex)
may not use noninteger frequency weights

However, I summarized the weight variable and they seem to be fine:

. sum wtper

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       wtper |   3971891    17.56003    8.800185          2     167.13

In order to solve this, I tried to create new rounded values, but none was
created:

. replace wtper_rounded=0 if  wtper<0
(0 real changes made)

Also, I tried to recast, but the error persists.

. recast int wtper
wtper:  3932021 values would be changed; not changed

. collapse (count) id [fw=wtper], by (granosest sex)
may not use noninteger frequency weights

Any ideas?

Thank you,

Raquel

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index