Hello,
I have a database where the gvkey idenitfier is known for all firm year observations. But the cik identifier is not know for all firm year observations. For the table below the missing value should be 1750 based on the combination of gvkey and cik in other fiscal years. Is there a way that I could generate this missing value for all observations where it is missing but I know what it should be based on the gvkey-fyear combination in other rows?
Thanks!
I have a database where the gvkey idenitfier is known for all firm year observations. But the cik identifier is not know for all firm year observations. For the table below the missing value should be 1750 based on the combination of gvkey and cik in other fiscal years. Is there a way that I could generate this missing value for all observations where it is missing but I know what it should be based on the gvkey-fyear combination in other rows?
Thanks!
| cik | gvkey | fyear |
| 1750 | 1004 | 2015 |
| 1750 | 1004 | 2016 |
| 1750 | 1004 | 2017 |
| 1750 | 1004 | 2018 |
| ? | 1004 | 2019 |

Comment