Announcement

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

  • Need help with aggragating data at individual level to region level


    Please can someone help




    I have observations collected at individual levels in a number of regions in 23 different country.




    I need help on how to aggregate individual data to regional level.




    The original survey data has these three variables



    Iweight individual weights based on gender and age compared with region’s actual population
    Dweight – the design weight
    PSweight – the post stratification weight
    Pweight – the population weight

    My understanding is that I should use PS weights and population weights.
    I tried this command
    *Calculating mean regional scores
    collapse (first) Pweight PSweight (mean) corruption impartiality qaulity q_o_g, ///
    by(nuts nuts_name country nuts_c year)
    I am not confident that this is the right command becuase Pweight refers to national population and Psweights is a includes design weight but also I am not sure of the collapse command.

    Kind regards

    Jonathan


  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    As a general rule, the best way to check this kind of thing is to do it on a very few observations and check that it is giving you the numbers you think you should get. Sometimes, creating arbitrary numbers in a trial data set can make this easier. I'm not really qualified to check your code.

    Comment


    • #3
      Hi Phil
      Thank you for your response. I managed to crack the problem.

      Comment

      Working...
      X