trend analysis with svy comand [message #12119] |
Wed, 29 March 2017 14:48 ![Go to next message Go to previous message](/theme/default/images/down.png) |
sc.sanchez
Messages: 5 Registered: January 2017
|
Member |
|
|
Hello,
I am analyzing the DHS 2010 for Colombia in Stata. I need to test the trend across a categorical variable (age groups) but nptrend comand is not supported by svy. I tried two ways:
First, using regress and contrast postestimate:
svy: regress UnmetNeedTotal i.AgeGr
contrast ar.AgeGr
but, the output shows a p-value for each contrast (1 vs. 0; 1 vs. 2; 2 vs. 3). How I obtain an unique p-value for trend?
Second, using regress and test postestimate:
gen Age1 = (AgeGr==1) if AgeGr!=.
tab Age1
gen Age2 = (AgeGr==2) if AgeGr!=.
tab Age2
gen Age3= (AgeGr==3) if AgeGr!=.
tab Age3
svy: regress UnmetNeedTotal Age1 Age2 Age3
test Age1 Age2 Age3
Output shows a p-value for Fisher test, but I donĀ“t know if this output is equivalent for trend across a categorical variable.
Any help will be apreciated.
|
|
|