Svy command [message #4367] |
Fri, 15 May 2015 03:54 |
erimgina@yahoo.com
Messages: 3 Registered: April 2015 Location: China
|
Member |
|
|
I am planning to do secondary data analysis to investigate the relation ship between family planning use and increase weight among women using modern contraceptive method for 2010 DHS Survey data, I am getting difficult to use svy command in stata, I have tried to write the program after reading the user manual I am still getting results with missing some information, this is the command that I have written to set svy command
gen psu= v021
gen wght=v005/1000000
egen strata = group(v022 v023), label
svyset psu [pweight=wght], strata(strata)
svy: mean age
the result is missing standard error and 95% confidence interval and at the bottom of the table I get this message "Note: missing standard error because of stratum with single
sampling unit."
Same problem when I use regression analysis, any help!
|
|
|
Re: Svy command [message #5442 is a reply to message #4367] |
Wed, 27 May 2015 11:54 |
Liz-DHS
Messages: 1516 Registered: February 2013
|
Senior Member |
|
|
Dear User,
Here is a response from one of our experts, Dr. Tom Pullum:
Quote:For psu you can use either v001 or v021. They are identical. I personally use v001 but you are definitely ok with v021.
For the weights, it is not necessary to divide v005 by 1,000,000. The pweight option will automatically normalize the weights.
The strata are virtually always the combinations of region and urban/rural, which you can get from "egen strata=group(v024 v025)". Often v023 will give the strata directly. Usually there are no more than about 30 strata. If you are getting lots more than 30, you probably are not identifying the strata correctly. Your command "egen strata = group(v022 v023)" may be giving you too many strata, and therefore increasing the chance of getting your error message.
There is an additional component to the svyset command that will take care of your error message, called "singleunit". Even when the strata are correctly identified, this error message can come up, so I recommend that "singleunit" be specified routinely. Here is the complete svyset command, with three possible versions of "singleunit".
svyset v001 [pweight=v005], strata(strata) singleunit(centered)
svyset v001 [pweight=v005], strata(strata) singleunit(scaled)
svyset v001 [pweight=v005], strata(strata) singleunit(certainty)
You might check the sensitivity of your results to which of the three you use. The potential effect will be on the standard errors, not the coefficients, and will be negligible. (The only component of svyset that affects the coefficients is "pweight".) I usually use "centered" but I'm sure a case could be made for any of the three.
|
|
|