I have a database with three variables: 27 states, 10 years and a GDP for each year. I want to generate a variable with the resulting logical operation: if year=2017, then GDP*2 & if year=2018, then GDP*7 & if year=2019, then GDP*15, and so on.
How can I do that, please?
Related Posts with Logical operation using generate
Difference in Difference Parallel Trends testDear Statalisters, I am running a Difference in Difference analysis. In order to test whether treat…
asclogit or clogit with treatment and control?Dear all, I have conducted a labelled choice experiment with labels=engine type (gasoline, EV, HEV)…
Using cmp command for simultaneous equation model with an ordered endogenous variableHello everyone, I’m running a simultaneous equation model with 2 equations as following : Y1 = f(Y…
F test values are missing, I tried to understand it from the previous post but could not get it.I am very new stata, please pardon me if i sound stupid. I rana regression with xtreg fixed effect w…
Pre post analysis with ANOVAGood morning, I was asked to perform a pre-post analysis with ANOVA in order to see the effect of th…
Subscribe to:
Post Comments (Atom)
0 Response to Logical operation using generate
Post a Comment