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 Logic operations with generate
Finding Median for weighteds survey dataGood afternoon, I am using survey data and because I need to account for the sampling & pweight…
New package robit on SSCThanks once again to Kit Baum, a new package robit (described as below on my website) is now availab…
How to send frame results to ExcelHello everyone, I am totally a beginner at Stata. I would like to drop certain variables before fur…
Replacing missing values with criterionHello everyone, I am working with panel data, and I would like to ask you again for help. I would li…
R2-values are very, very low.Im currently writing my bachler's thesis about economic growth (GDP per capita) and democracy (Polit…
Subscribe to:
Post Comments (Atom)
0 Response to Logic operations with generate
Post a Comment