Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Do I use survey? with suest?


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st: Do I use survey? with suest?
Date   Sun, 17 Dec 2006 11:16:20 -0500

On Dec 13, 2006, at 8:47 PM, Pura Rayco-Solon wrote:
We did a reseach using a controlled before-and-after
quasi-experimental design, but with a different set of
subjects at endline. How do I analyse this data?

Pura, I am going to assume that you have svyset your data properly to reflect the sampling design. If you need help
with svyset, please ask. (The variable group (or province) should be the stratum variable.)

In what follows, I assume that your intervention area and time period variables are "group" and "period"
group 1 = control 2 = intervention
period 1= baseline 2 = endline
y response variable

The following code will then work for you.

Good luck!

Steven

/* Code for Pura's Question */


gen gp11= group==1 & period==1
gen gp12= group==1 & period==2
gen gp21= group==2 & period==1
gen gp21= group==2 & period==2
gen gp22= group==2 & period==2


svy: reg y gp11 gp12 gp21 gp22, nocons

lincom (gp22-gp21) // End - Baseline Group 1
lincom (gp12-gp11) // End - Baseline Group 2
lincom (gp22-gp21)-(gp12-gp11) // Group difference

/* ALTERNATELY */

xi: svy: reg y i.group*i.period // _ItypXper_~2 interaction line will give you the same result as the last lincom





*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index