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
Matching with CEMDear Statalisters, I am stuck at a seemingly easy code. I am using matching algorithm, cem (coarsen…
Group conditioningHi there! Pardon me for a stupid thread title. I didn't know what to call it. I have the household…
Conditional Logistic Regression VariablesHello, Just wondering if there is a limit on the amount of independent variables that Stata will acc…
correlationhae guys is there a code for finding correlation between a categorical nominal variable and dummy va…
Match rows within panel base on a variableHi, everybody I have the following code. I want to match the number of row base on prc_max. For ins…
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