Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Steven Samuels <sjsamuels@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st:-expand- to adjust according to the sampling weight |
Date | Mon, 20 Dec 2010 21:59:34 -0500 |
Steven Samuels sjsamuels@gmail.com 18 Cantine's Island Saugerties NY 12477 USA Voice: 845-246-0774 Fax: 206-202-4783 On Dec 20, 2010, at 9:11 PM, Amanda Fu wrote: 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/ * * 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/