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]

Re: st:-expand- to adjust according to the sampling weight


From   Amanda Fu <[email protected]>
To   [email protected]
Subject   Re: st:-expand- to adjust according to the sampling weight
Date   Mon, 20 Dec 2010 21:11:54 -0500

Dear Mr. Samuels,

Sorry for not making my question clear. I will keep in mind to provide
plenty of details in the future.

Here is my response to the questions you listed: The command is
-kdens2- , -spkde-,-spmap-. They allow neither frequency weights nor
sampling weights. The data structure is unbalanced panel data.There
are no clusters and strata. Simply only the sampling weight for each
individual exists. The purpose of my study is to estimate the
bivariate kernel density.

I thought I could expand the data based on sampling weights before
using those commands. I thought I could treat sampling weight similar
as frequency weight when expanding the data set:

.expand sweight

Even if this command is appropriate, it has a problem: the average
value for sampling weight in the data set is close to 3000. The
expanded data set would be too huge. Thus I was thinking to expand
with a smaller number, say

. sum sweight
. g new_weight=sweight/r(mean)
. expand new_weight

This way a number of observations will just remain unchanged after
expanding. I am not sure if this makes sense.

Thanks for your time!
Sincerely,
Amanda
*
*   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