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
Related Posts with generate weighted variables
Help needed with labeling y axis on a twoway graphDear Statalist users, I am creating a graph where I display recurrent event times over a period of …
Coefplot issueHi all, I have a quick question. My code is below. When I do this code without the "at(vertical)" p…
betaHi everyone, I have a panel data comprising daily stock returns of companies, risk free rates and da…
Setting effect directionalityHow can I demarcate the direction of a measure in my dataset? For example, I have one test where fav…
Standard error of quantile commandHello all,when I was doing quantile regression, I outputted the table and found that several of the …
Subscribe to:
Post Comments (Atom)
0 Response to generate weighted variables
Post a Comment