Site icon Stata.Professor : Your Partner in Research

How to fill missing values by companies or groups in Stata

Hello Sir I want to fill missing values in a variable named prices with any previously available values of the same variable. However, the missing values should be filled within each company (ie my grouping variable is company). Further, I want to fill the missing values in chronological order, that is the current missing values should be filled with the available values in preceding days, not from the following days. I wonder how can I use the fillmissing program for this. Thanks for your cooperation.
Exit mobile version