Announcement

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

  • issue working with country-year and individual dataset - together in 1 dataset

    Hi guys, I am currently working with 2 dataset (1. country year dataset for 54 African countries from 1991-2022, which contains variable: yp_exist, whether a country has a National youth policy or not) and (2. Afrobarometer data. I did the following steps:

    A) I tried to transform the Afrobarometer data into country-year format correctly. To get more country-year observations I included all Afrobarometer rounds (imported all 8 rounds into Stata, clean the data, and then combined (appending) all 8 into one “mega” afrobarometer dataset.

    B) Once I had the mega dataset, I then used the collapse command collapse (mean) Q50N Q50H Q50C Q50B Q95A Q97 Q21 Q1, by(country year) - grouped it into country-years. Then I had longer time range of country years now, However, with less variation- meaning, I was not able to do the following (which is the variation that I am interested in to begin with)

    gen Education_need = .
    replace Education_need = 1 if Q50H==3 | Q50H==4 //1=Very badly, 2=Fairly badly
    replace Education_need = 0 if Q50H==1 | Q50H==2 //3=Fairly well, 4=Very well

    gen jobcreation = .
    replace jobcreation = 1 if Q50C==3 | Q50C==4 //1=Very badly, 2=Fairly badly
    replace jobcreation = 0 if Q50C==1 | Q50C==2 //3=Fairly well, 4=Very well


    C) Then, after that, I merged this megadata into the Youthpolicy dataset + V-Dem + UCDP data.

    I now wanted to test the following hypothesis: want to test the following hypo: "H2: does presence of NYPs moderate the perception of government handling of educational needs? Youth in countries with active national youth policies are more likely to perceive the government handling of young people's needs as fairly well than youth in countries with no such policy."

    Using the command:

    logit Q50H yp_exist yp_years_existed InfantMortalityRateinfantde totalpopulationasof1july_ln e_gdppc_ln v2x_libdem_M

    but I am getting the error messages:

    outcome does not vary; remember:
    0 = negative outcome,
    all other nonmissing values = positive outcome
    r(2000);

    end of do-file

    Can anyone please help me with this or refer me to a tutor who I can pay to help me fix this issue ?
Working...
X