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
Normalization of year interaction term to zero for interpretationDear all, I am working with a cross-sectional data set for the years 2005 to 2015. I am trying to e…
Insignificant Pooled OLS model running with bank lending dataHi, We are writing our master thesis on the effect of capital requirements on bank lending, using t…
Ordered Logit coefficient interpretation with categorical (>2) independent variablesHi I am running an ologit model to understand the effect of parents' beliefs on students' high scho…
Predicting factors scores after CFAHello I am currently working on confirmatory factor analyses with my survey data using the command …
Help on control variablesDear everyone, I am running a regression of banks in around 26 countries, and I want to include con…
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