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
How to do matrix exponential operation in Stata? Code: matrix A = (1,0,0,0,0\0.6,0,.4,0,0\0,.6,0,.4,0\0,0,.6,0,.4\0,0,0,0,1) matrix list A matrix B…
Generate balance tableHi, I'm trying to replicate this balance table (as in the picture) using some of the example dataset…
Inverted Normal GraphHello all, Admittedly a mundane question here... I'm simply trying to plot an inverted normal distr…
WLS regression using regwls and regressDear All, I have a question regarding WLS regression using Stata commands regwls and regress and wo…
gsem covstructHello. I am running LPA analysis using gsem command. I ve run the analysis in R using the mclust com…
Subscribe to:
Post Comments (Atom)
0 Response to generate weighted variables
Post a Comment