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
Help!How could I draw a restricted cubic spline using linear regression?I am working on a project using linear regression and I want to draw a restricted cubic spline for r…
Error after -cem- command (coarsened exact matching)Hi all, Using Stata 17, I am trying to run coarsened exact matching commands (i.e., -cem-) introduc…
What is the reference for excluding a covariate if there is many missing observation?Normally, I exclude a covariate out of the regression equation if there are many missing observation…
Regarding Interval data (generating more years and duplicating values)Dear, Can anyone help me to manage the data? I have interval data. Since the data are only availabl…
Combining multiple roc curvesHello all, I have used logit for multiple roc curves and am looking for how to put them all on the …
Subscribe to:
Post Comments (Atom)
0 Response to Coding question
Post a Comment