Announcement

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

  • ipfraking with census data; large discrepancy between target and achieved

    Hi all,

    I am working with paid panel data that was heavily weighted towards white, female respondents. I would like to weight the data to reflect census estimates better using ipfraking but am having some trouble.

    First, the ipfraking command requires initial pweights. I have simply assumed a random sample and generated a probability weight equal to 1/pop, (pop = the census estimate of the adult population in the state we sampled). Is that the right initial pweight to use, given that I really do not have a random sample here?

    Second, currently I am raking on two variables: gender and hispanic. My code is below:

    Code:
    * Gender
    matrix mfemale             = (1787688, 1960401)
    matrix colnames mfemale = _c:0  _c:1
    matrix coleq mfemale     = _one
    matrix rownames mfemale    = female
    matrix list mfemale
    
    * Hispanic
    matrix mhispanic           = (367239, 120850)
    matrix colnames mhispanic = _c:0  _c:1
    matrix coleq mhispanic       = _one
    matrix rownames mhispanic = hispanic
    matrix list mhispanic
    
    gen pw=1/3748089
    
    ipfraking [pweight=pw], generate(rakedwgt) ctotal(mfemale mhispanic) iter(5000)


    Running this, I get the error code "Warning: the controls mfemale did not match" and also "The worst relative discrepancy of .86978 is observed for female == 1 Target value = 1960401; achieved value = 255290.16"

    Can anyone provide some insight into why there is such a large discrepancy between the target and achieved values for gender? Weights ending up with a value of 255290 for female would imply that 6% of the weighted population is female, wouldn't it?


    Thanks for any help.
    Last edited by Sarah Thorne; 22 Nov 2019, 17:11.
Working...
X