Hi Sang Wong,
I too use survey design in my multi-level models. Here's a good reference that discusses this issue:
http://www.biomedcentral.com/1471-2288/9/49

I'm also attaching an example of how to do this  in a data source I use, the Behavioral risk factor surveillance system, which has a nested sample design of strata within states. It uses the A Method from the paper in the link above.
In this example, the strata are unique within states, so I make an ID that shows this, then I sum the sample weight (cntywt) within these areas, then count the number of subjects within each state/strata, the scale the person weight/sample weight by the size of the stata. The survey data is called "merged" below. This can also be done using multi-stage designs, as discussed in the paper above.

#Here is an example of using weights that sum to the county-specific sample size
#make an id that is the combination of state and strata
merged$sampleid<-paste(merged$state, merged$ststr)
#within each sampling unit, sum the weights
wts<-tapply(merged$cntywt,merged$sampleid,sum)
#make a data frame from this
wts<-data.frame(id=names(unlist(wts)), wt=unlist(wts))
#get the unique sampling location ids'
t1<-as.data.frame(table(merged$sampleid))
#put all of this into a data set
wts2<-data.frame(ids=wts$id, sumwt=wts$wt, jn=t1$Freq)
#merge all of this back to the original data file
merged2<-merge(merged, wts2, by.x="sampleid", by.y="ids", all.x=T)
#In the new data set, multiply the original weight by the fraction of the
#sampling unit total population each person represents
merged2$swts<-merged2$cntywt*(merged2$jn/merged2$sumwt)

Hope this helps!

Corey Sparks, PhD
Assistant professor
Department of Demography
The University of Texas at San Antonio
501 West Cesar E Chavez Blvd
San Antonio TX 78207
Corey.sparks 'at' utsa.edu<http://utsa.edu>
210 458 3166
coreysparks.weebly.com<http://coreysparks.weebly.com>



	[[alternative HTML version deleted]]

