Home Forums Fillmissing: Fill Missing Values in Stata Variables Fill missing values with the mean value in Stata Reply To: Fill missing values with the mean value in Stata

Attaullah Shah
Keymaster
Post count: 69

To fill missing values with the mean value in a panel data, you can use the following command structure:

bys id: fillmissing varname, with(mean)

Where id is your panel id, such permno, company name, or country. And the varname is the name of the variable which contains missing values.