Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: best way to estimate overall mean of clustered, stratified data using xtreg


From   "Pagel, Christina" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: best way to estimate overall mean of clustered, stratified data using xtreg
Date   Thu, 13 Sep 2012 09:15:47 +0000

Dear Steve,
Thanks for replying!

The data come from a cluster randomised controlled trial. Basically three different districts were involved. In each district 12 clusters were prospectively chosen and then (within districts) randomised to control or intervention.

Within each cluster all births were recorded as well as various protective birth practices associated with each birth. I want to calculate the cluster adjusted mean of the count of birth practices for the control arm only (ie 18 clusters, 6 in each district). The number of births in each cluster ranges from about 350 to 650...

does that make it clearer ?
Thanks
Christina

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Steve Samuels
Sent: 12 September 2012 11:26 PM
To: [email protected]
Subject: Re: st: best way to estimate overall mean of clustered, stratified data using xtreg


You are describing what was apparently a sample survey of three
districts. I would recommend that you -svyset- your data and use -svy:
mean-. At the very minimum, you would:

svyset village [pweight =??], stratum(district).

You will have to supply the probability weight. This advice might change
if you describe the study design, sampling process, and purpose in more
detail.


Steve


On Sep 12, 2012, at 1:51 PM, Pagel, Christina wrote:

I've got data (9000 ish records) that was collected in 18 clusters (villages) in 3 geographical districts (6 clusters in each district). 

I've got a variable that is an integer count variable and I want to estimate its mean across all the data, taking clustering into account (since there is definitely intra cluster correlation). 

If there were no districts I would simply do:

Xtreg CountVar, i(TrialCluster) re

And then the returned constant would be the mean and I'd also get confidence intervals. 

To take districts into account (the variable is quite dependent on district), I thought I would do:

Xtreg CountVar i.District1 i.District2 i.District3, i(TrialCluster) re 

Where the District variables are mutually exclusive binary variables saying which district the record is in...

The question is how do I now get an overall estimate for the mean from the results? 

One way I thought of is to generate the estimated value for each record and take the mean of that:

Gen  EstimatedCount=coeff1*District1+coeff2*District2+coeff3*District3+const 

And then do:

Means EstimatedCount

To get the estimate of the mean - this works (as in generates a plausible mean) but the condifidence intervals are far too small to be realistic for this data... which makes me think there must be a better way of doing it!

Any suggestions would be gratefully received! 

Christina 



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index