Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to define svyset in a three stage desing with several stratification variables

    I have survey data that I want to analyze in STATA using svy but when I try to specify the svyset I get an error message saying that fpc must be the same within each stratum. I'm not sure what the problem is. This is the survey design:

    1) First stage: sampled 8 districts within each region. There are 3 regions total
    2) Second stage: 10 schools were sampled within each district stratifying by rural and urban. Schools were selected from 2 different frames, one frame with a list of urban schools and the other with a list of rural schools
    3) Third stage: 13 students were sampled within each school for each of the 3 grades: 2, 4 and 6.

    This is the list of IDs used in the svyset:

    region_id: unique id for each of the regions (1-3)
    district_id: unique id for each of the districts sampled (1-8)
    urban: id to identify whether a school is rural or urban (U or R)
    school_id: unique id for each of the 80 schools (10 schools in 8 districts)
    grade: id to identify grades 2,4,6
    id: unique id for each child in the sample

    These are my fpcs:

    ndistricts: this is the number of eligible districts in each region (e.g. 23, 25 and 28).
    nschools: this is the number of schools in each district by urban/rural. (e.g. nschools=40 for district #1/urban and nschools=60 for district#1/rural). There are 2 different fpc numbers for each district, one for rural and one for urban.
    nstud_bygrade: this is the number of students per grade for each school.There are 3 numbers for each schools sampled.

    This is the svyset

    svyset district_id [pw=wt_final], strata(region_id) fpc(ndistricts) || school_id, strata(urban) fpc(nschools) || id, strata(grade) fpc(nstud_bygrade) singleunit(centered)

    I have read the manual but I don't know what the problem is. Are my fpcs or the strata ids? Should instead of being the urban variable (U/R), should it be districtxrural/urban?

    I wish you could help me and give me some guidance. I really appreciate your time for reading this e-mail.

    Thanks,
    Jenny

  • #2
    Welcome to Statalist, Jenny. The first thing to do is identify the stage(s) that are causing the problem. Omit all but the first stage fpc option; if there's no error, add the second stage option; if there's still no error you will know the problem is at the third stage. One more thing, I see that you overlooked the statement on the registration page that "Statalist etiquette is to use your full real name.". This practice is described on in section 6 of the Statalist FAQ at http://www.statalist.org/forums/help. As a long-time Statalister, I prefer to engage only with posters who respect this practice, and I ask that you do so. Just use the "Contact Us" link at the bottom of the page.

    Steve Samuels
    Consultant in Statistics
    18 Cantine's Island
    Saugerties NY 12477
    USA
    Voice: 845-246-0774
    Fax: 206-202-4788
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Thanks Steve. I already changed my user name.

      Comment


      • #4
        Great, Jenny! Many Statalist interactions have led to collaborations, friendships, even employment. None would have been possible without real names!
        Now, have you isolated the sampling stage that is giving you the error message?
        Last edited by Steve Samuels; 11 Jul 2014, 17:10.
        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment


        • #5
          Originally posted by Steve Samuels View Post
          Many Statalist interactions have led to collaborations, friendships, even employment.
          Just curious: any marriages to date?
          Sergiy

          Comment

          Working...
          X