I am running into a wall on applying a predicted class of a state (all 50 states have one of four predicted classes) in 2001 to the rest of the years in the dataset. The data is set as long with the variables state, year, and predclass. Any tips or tricks on how to either (a) change the predclass variable within a state to the 2001 level or (b) create a new variable from these three to apply the 2001 predicted class to the other years?
Thanks in advance.
Related Posts with Coding question
Constructing real rate of return variableDear Community, I am trying to construct a real rate of return on a bond of 2 years to maturity. Th…
How to identify if each ID has two unique values for a variableHello! I am somewhat new to Stata and have tried to find an answer to this on other threads but have…
IV estimation - panel data 2SLS and LIML model are giving me the same exact results, when i am trying to control for weak instruments.When i ran my panel IV estimation, using xtivreg2, I saw my instruments were very weak and thus trie…
drop observationsHello! I am new in STATA. Please help me with this issue I need to drop observations with "choice" …
Changing the Column Titles and adding notes using Outreg2I am trying to export a table of summary statistics using the following command: outreg2 using "res…
Subscribe to:
Post Comments (Atom)
0 Response to Coding question
Post a Comment