Home » Data » Dataset use in Stata » using svy command and getting out pvalues
using svy command and getting out pvalues [message #11983] 
Wed, 15 March 2017 13:10 
chichi
Messages: 9 Registered: March 2017

Member 


Hello!
I am using the Namibian DHS 2013. I created one file with women's, men's and HIV data.
I want to calculate the percentage of people aged 1549 years, who have heard of AIDS, by background characteristics. I got the same frequencies as in the Namibian final report 2013. But I am not sure if the pvalues may be true. For example by residence the pvalue for women is significant and for men not, although there are no great differences. I load up a part of my results. It would be great if someone could help me. Thank you!
I used the svy command. Here is also my stata code:
svy: tab v013 v751 if gender== "men", missing row
svy: tab v013 v751 if gender== "women", missing row



Re: using svy command and getting out pvalues [message #11988 is a reply to message #11983] 
Thu, 16 March 2017 04:56 
Mlue
Messages: 32 Registered: February 2017 Location: Cape Town

Member 


I think this is supposed to give you the Pvalues... But, try this...
svy: tab v013 v751 if gender== "men", percent format(%4.1f) missing row // Percentages
svy: tab v013 v751 if gender== "men", count format(%4.0f) missing // Counts
** ================================================================== **
svy: tab v013 v751 if gender== "women", percent format(%4.1f) missing row
svy: tab v013 v751 if gender== "women", count format(%4.0f) missing
Now, check your output... the Pvalue will be the P under your output table...
Example:
Pearson:
Uncorrected chi2(6) = 14.9190
Designbased F(5.65, 1797.69) = 1.8115 P = 0.0979
So, here the Pvalue is P=0.0979... Please let me know if it works






Re: using svy command and getting out pvalues [message #11999 is a reply to message #11992] 
Fri, 17 March 2017 08:10 
BridgetteDHS
Messages: 1315 Registered: February 2013

Senior Member 


Following is a response from Senior DHS Stata Specialist, Tom Pullum:
I approached this in a different but equivalent way, using logit regression. I find this:
Women by age group: p= 0.2626, not significant
Women by residence: p=.0002, very significant
Men by age group: p=.0000, very significant
Men by residence: p=.8207, not significant
In terms of statistical significance, the results are different for men and women. However, the substantive implications are really the same for men and womennamely, knowledge is extremely high for all the groups of men and all the groups of women.
Here is how I did this (you must change the paths):
use e:\DHS\DHS_data\IR_files\NMIR61FL.dta, clear
svyset v001 [pweight=v005], strata(v022)
tab v013 v751 [iweight=v005/1000000], row
svy: logit v751 i.v013
svy: logit v751 i.v025
use e:\DHS\DHS_data\MR_files\NMMR61FL.dta, clear
svyset mv001 [pweight=mv005], strata(mv022)
tab mv013 mv751 [iweight=mv005/1000000], row
svy: logit mv751 i.mv013
svy: logit mv751 i.mv025






Re: using svy command and getting out pvalues [message #12051 is a reply to message #12050] 
Thu, 23 March 2017 10:01 
BridgetteDHS
Messages: 1315 Registered: February 2013

Senior Member 


Following is a response from Senior DHS Stata Specialist, Tom Pullum:
You cannot "merge" the IR and MR files. You "append" those files. Your line "svyset [pw=wgt1], psu (v001) strata (v023)" will not run. The correct syntax would be "svyset v001 [pw=wgt1], strata (v023)". Your commands should not include the option "missing". What you are calling "missing" cases are actually "not applicable" cases and they are not relevant.
The "uncorrected chi2" value ignores the svyset adjustment. You could get that from a simple "tab a b, chi2" command. The "Design based" model cannot produce a chisquare statistic (neither the Pearson nor the maximum likelihood versions of chisquare), as I said in my previous response. It produces an F statistic from a logit regression (either binary logit or a multinomial logit, depending on the number of categories), in which the svyset adjustment is possible. The pvalue from F has the same interpretation that a pvalue from a maximum likelihood chisquare would have, if such a chisquare could be calculated.



Goto Forum:
Current Time: Sun Apr 22 00:42:27 Eastern Daylight Time 2018
