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
No observations r(2000) with Regress and SEMHello all. I am working with a dataset that contains many categorical variables with values that are…
Quick questions about the interaction methodsDear Researchers, Greetings, I have quick questions about interaction variables, please. At first,…
Creating first-order difference variables in repeated cross-sectional (i.e. pseudo panel) dataGreetings, I'm running Stata 15.1 on OSX. I've created a repeated cross-sectional dataset to assess…
One-sided test of coefficients obtained by mixedDear all, I ran mixed 'outcome' 'treatment' 'binary_covariates' 'metric_covaraites' [fweight=w] || b…
Taking Results from Tab2 and Using them to Generate/Recode a new variableI have a big dataset (1.7million obs) and I need to create contour plots by a member_id within the d…
Subscribe to:
Post Comments (Atom)
0 Response to add values to certain groups
Post a Comment