Hi everyone,

I need some help.
I want to analyze the difference/change of life satisfaction between the years 2019 and 2020. Therefore I want to create a new variable based on the subtraction of life satisfaction in 2020 – life satisfaction in 2019, but with weights for both years.
Weights are not allowed in the commands gen, egen and clone.
How can I create a weighted life satisfaction variable for 2020 and 2019?
I also tried this command: gen newvar_2019= var2019 * w2019, but it didn´t work.
Life satisfaction is measured from 0 – 10 and my weight variables are w2019 and w2020.

Thank you
Kim