Hello there, I have a panel with variables fundno, fdate, stock_id, stock_price and holdings. Many of fundno - stock_price pairs are observed twice a year( second and fourth quarter) before 2004 and I want to impute first and third quarterly obs. before 2004 by carrying forward the previous fdate's holding for each fundno - stock_id pair. I tried to use "fillin fundno stock_id fdate" to get a balanced panel and then delete consecutive missing obs. (>=2) for each fundno - stock_id pair and then use carryforward, but the balanced data got so huge that my laptop couldn't handle. Plus I couldn't find a good way to delete consecutive missing obs.(tried tsspell but it didn't work) Is there any better way to this?
Thanks,
Hank
Related Posts with How to impute quarterly panel data based on semiannual panel data by copying previous obs.?
Categorize Date VariablesIs there a way to categorize or recode date variables (say which is in %td format) in Stata? This wo…
making a number of variables based on values of other variablesHello, I have been receiving great help from the Stata Forum by searching - but today I have encount…
Bug in asreg?I believe there is a bug in the asreg function. When I run rolling window regressions on panel data …
How to merge multiple data sets without id variable?Hi, I want to merge multiple cross-sectional micro data files for each year (1992-2003) to make a si…
Include N (counts) as bar labelsHi Stata users, I am interested in having N/counts in a graph apart from the current label (percent…
Subscribe to:
Post Comments (Atom)
0 Response to How to impute quarterly panel data based on semiannual panel data by copying previous obs.?
Post a Comment