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
Multilevel Linear Regression: how to create model with my data in stataHello, I am working with Stata for the first time and statistics was not my strongest point so far,…
Resources/Road map for learning regular expressions with StataI’ve seen many contributors here (including Andrew Musau William Lisowski Bjarte Aagnes Ali Atia to …
Adjust for inflation using CPI indexI'd like to add a list of CPI index values to my panel dataset and use them to adjust the values of …
Regression Discontinuity design in stataHi there, I am trying to run a regression discontinuity on the following dataset: Code: * Example…
reshape long-form to wide-formHI! I need to use the penal-data multinomial logit model in my analysis, and before I use the "xtmlo…
Subscribe to:
Post Comments (Atom)
0 Response to generate weighted variables
Post a Comment