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
Employment binary variable into employment rate and continuous variableDear all I am wanting to create an employment rate variable (ie. Number employed/ (Labour Force) * …
Herfindahl - Hirschman Index input the right data structureDear all, I am currently doing my thesis. As part of this, I would like to calculate the Herfindahl…
Survey data analysisI am new to STATA (15.1) and hope someone can help me with how to "Declare my survey design for my d…
reclinkDear community, I have merged two datasets based on a unique companyid with the reclink command. …
Removing " " from a string responseHello! I am working with survey data where some responses have been entered along with quotation mar…
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