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
Logistic Regression with ClusteringHello users, I am new to the forum, but hoped you would be able to settle a small dispute we are ha…
How to interact a variable with Fixed Effect. Help!Hi! I am working on my final paper and could need som help. What i'm trying to do is to investigate …
Help with regression of (unbalanced) panel data - xtreg, statsby/regressby generating difference resultsHi Statalist! First of all, thank you for all the help you give on a daily basis! It's been very he…
SEM for longitudinal Data!Hi to all, I am new to stata and have to build an SEM for my research, but i am struggling to figure…
Dummy variable interpretation Code: Source | SS df MS Number of obs = 1,315 -------------+…
Subscribe to:
Post Comments (Atom)
0 Response to Logic operations with generate
Post a Comment