[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: how to generate the weights after sample and assign svyset
Would greatly appreciate your help with my two questions:
1. What weights correspond to my sample statement
2. How to svyset my 2 stage sample
1. I used the following code to generate my sample schools within each strata:
set seed 123456789
sample 4.28, by(lgacode numschools)
I was aiming to do a probability proportional to size (pps) sample but I do not think this is it (correct me if I am wrong).
How does the by statement affect my sampling weights?
I think I just did simple random sampling and my code should be:
2. After the schools are sampled, teachers are sampled systematically:
One teacher within each class level as the teacher might be selected as the first, last or middle name in an alphabetized list.
So my svyset statement for the school-level dataset should be:
svyset school_code [pw=weight], strata(strata) fpc(numschools_bystrata)
and for the teacher-level dataset
svyset school_code [pw=teacher_weight], strata(strata) fpc(numschools_bystrata) || teacherid
Thank you in advance.
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
* For searches and help try: