Hi everyone,
I have a dataset on companies, its financial years, matching financial numbers and error years.
Some of the companies have years where errors have occurred. For those companies, there is a variable with the year where the error has occurred (but only for the observation of the suitable year). There are always other observations for the same company in different financial years, but without the year of the error. I need to add the year of the error to every observation of the company that had an error.
I already created groups for every company (using "egen"), but I don't know how to add the error financial year variable to the other observation of the respective company.
Can someone help?
Example:
Company financial year error_year
1. Company1 2014 -
2. Company1 2015 2015
3. Company1 2016 -
4. Company1 2017 -
My goal is to have the error year (2015) for every observation of Company1.
Thanks in advance,
Judith
Related Posts with add values to certain groups
extracting a period of timeHello STATLIST, I'm trying to extract a time period to do my analysis, I used the following code, b…
Extracting hour dummies from datetime variableDear Statalisters, I am working with a panel data that includes a datime variable (Cdayhour, ex: 21f…
Pooled panled portfolio regressionDear Statalists, currently I am struggling with the outputs of my pooled portfolio regression. I ha…
Survival analysis. Age as time variable. Need to include age in posterior analysis.Dear statalist community, Following the advice from the community given in my last post, I set up a…
Generate dataset for simulation (non-i.i.d panel data)Hello everyone, Hope you all are well and keeping safe. I have a question for the community here a…
Subscribe to:
Post Comments (Atom)
0 Response to add values to certain groups
Post a Comment