The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » trend analysis with svy comand
trend analysis with svy comand [message #12119] Wed, 29 March 2017 14:48 Go to next message
sc.sanchez is currently offline  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.
Re: trend analysis with svy comand [message #12127 is a reply to message #12119] Thu, 30 March 2017 13:58 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3035
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

You use the word "trend" but that word refers to changes over time. You are using a single survey, so you must be thinking of cross-sectional variation rather than trends. If you want to see whether there is a linear relationship between y and the categories of AgeGr, you can just drop the "i." in front of AgeGr. The significance of the slope coefficient could be what you want. If you want just a single number to see whether the dependent variable varies by AgeGr, in any way, then you run your model and look at the p-value given at the top of the output, typically just below the F value.
Re: trend analysis with svy comand [message #12132 is a reply to message #12127] Fri, 31 March 2017 09:05 Go to previous message
sc.sanchez is currently offline  sc.sanchez
Messages: 5
Registered: January 2017
Member
Tom, you have help me so much.

Thanks!!
Previous Topic: using svy command and getting out p-values
Next Topic: logistic regression
Goto Forum:
  


Current Time: Sat Apr 20 09:54:34 Coordinated Universal Time 2024