I have panel data in which my cross-sectional units are farms. I am correcting a variable for the years farmed by the operator. For some farms, it starts at 0, but these farms have data, so the value should be 1. I would need to add 1 for each year for the farms that start out at 0 years, but am unsure how to do that across farms. To be more clear, for the farms that start at 0, I need to add 1 to the years farmed variable for every year for that farm. - Thank you in advance.
Related Posts with Changing variable value across cross-sectional units in panel data if criteria is met
Help with Recoding with Multiple LoopsHello, I have a series of variables that looks like job[i]_sched[y]. [i] varies from 1 to 6. [y] var…
repeated-measure vs. nested anova problemsI think I want to use Repeated-Measure Anova command, "anova, repeated ()" or "wsanova" commands bas…
svy:logit has more observations than simple logit commandI am working with survey data and use the svy command before running my logit regression as follows:…
qq PlotsHello everbody, I have estimated parameter alpha for each participant with six different methods. I…
addplot error after marginsplotI ran a model (dependent variable = gender) and 3 independent variables – year, position_department_…
Subscribe to:
Post Comments (Atom)
0 Response to Changing variable value across cross-sectional units in panel data if criteria is met
Post a Comment