Dear all,
I am using an unbalanced panel data set with about 880,000 observations for n = 5000 units, monthly data. These units are companies with certain amounts of assets.
I would like to do the following: For each company, generate a dummy variable equal to one from the month when the company reached at least 10m in assets on as long as the company is in the data set (regardless of which values of assets the firm reaches after that, i.e. it does not matter if it drops below 10m or not). These months when 10m threshold is reached are of course not the same for every firm, sometimes 10m is not even reached throughout the whole period.
I have got to the point when I identified the first moment (month) in the time series for each firm when the assets reached at least 10m. I have therefore a column of zeros with occasional 1, indicating these first months. Now, I would like to tell Stata to basically replace the zeros below these ones (e.g. 10m has already been reached and for further months I want just 1, regardless of the amounts of assets) for all companies by also ones.
I am stuck here and do not seem to find any feasible solutions. Can you please provide me with some advice? Thank you in advance!
KC
Related Posts with Panel Data - Fill in values for a dummy variable from a certain month on
Controlling for differences caused by occupationHello - I am new to the world of econometrics and am working on a small research paper. I am trying …
Different lagged variablesHello, I am trying to generate a variable based on the lagged values of other variables, where the t…
geonear r(459) error message adviceHi All, I am trying to calculate the distance of disaster occurrences from specific place names wit…
Plotting nonlinear predicted probabilities from multivariate model against a continous variableApologies if this has already been answered, but I have been unable to find a clear answer/I am not …
Using the character ehat_t in the y-axisDear all, I hope you are all keeping well! I want to use the character ehat_t in my y-axis So I t…
Subscribe to:
Post Comments (Atom)
0 Response to Panel Data - Fill in values for a dummy variable from a certain month on
Post a Comment