Announcement

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

  • Invalid psu variable name

    Hello,

    I am fairly new to stata and am just beginning to analyse some secondary data. I am setting up the sampling design using:

    svyset SPTN00 [pwt=FOVWT2], strata(PTTYPE2) fpc(NH2)
    pweight: FOVWT2
    VCE: linearized
    Single unit: missing
    Strata 1: PTTYPE2
    SU 1: SPTN00
    FPC 1: NH2

    noi svydes
    Survey: Describing stage 1 sampling units
    pweight: FOVWT2
    VCE: linearized
    Single unit: missing
    Strata 1: PTTYPE2
    SU 1: SPTN00

    However, the following error message is being shown:

    SPTN00 [pwt=FOVWT2] invalid psu variable name

    Any suggestions as to why this might be happening would be really helpful.

    Thanks.

  • #2
    Are you sure you have a variable named SPTN00? Remember that Stata variable names are case-sensitive.

    What happens if you run
    Code:
    des SPTN00

    Comment


    • #3
      Just as a side note, after Clyde's insightful advice: please make sure there is a blank space between the psu and the pweights.
      Best regards,

      Marcos

      Comment


      • #4
        Interested in knowing if you ever found an answer? Having a similar issue this afternoon with using the ELS:2002 dataset.

        Comment

        Working...
        X