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
Listing and retrieving data from SQL views when using odbcHi, I have data stored in a view in MS SQL Server and I am using ODBC to connect to this database f…
Help Required with Statsby Dear all, I have a panel dataset with 50 stocks and 43 quarters. Given below is a subset of my data…
How to combine variables with same values into oneHi everyone, Is there anybody known how to combine those variables that have totally the same value…
Why my stata run 'twoway scatter' can not get normal stata pictureHelp! Why my stata run 'twoway scatter' can not get normal stata picture, but get the picture like t…
reghdfe: running a difference in difference model with state FE, year FE and country specific trendsHello, I would like to run a diff-in-diff model with state fixed effects (FE), year FE and states sp…
Subscribe to:
Post Comments (Atom)
0 Response to generate weighted variables
Post a Comment