I have an unbalanced panel data with missing values.
I want to replace the missing values with mean of the time series observations of the concerned cross-sectional unit.
How to perform this function in SAS.
Thanks in advance.
Can you show us some data?
Dear Mr. Draycut. thanks for your prompt response.
the format of my data is as follows
| Company_Name | year | Total_remuneration | Capex |
| 20 Microns Ltd. | 2014 | 3916000 | 160 |
| 20 Microns Ltd. | 2015 | 3916000 | |
| 20 Microns Ltd. | 2016 | 4230000 | 60.9 |
| 20 Microns Ltd. | 2017 | 4961387 | 51.4 |
| 20 Microns Ltd. | 2018 | 4932459 | 162.3 |
| 3I Infotech Ltd. | 2012 | 6866.4 | |
| 3I Infotech Ltd. | 2013 | 13360000 | 9267.5 |
| 3I Infotech Ltd. | 2014 | 23480000 | 821 |
| 3I Infotech Ltd. | 2015 | 17780000 | |
| 3I Infotech Ltd. | 2017 | 27000000 | 11.2 |
| 3I Infotech Ltd. | 2018 | 19303045 | 13.9 |
| 63 Moons Technologies Ltd. | 2015 | 38726562 | -2.5 |
| 63 Moons Technologies Ltd. | 2016 | 22.8 | |
| 63 Moons Technologies Ltd. | 2017 | 3902000 | 40 |
| 63 Moons Technologies Ltd. | 2018 | 17257000 | 72.7 |
| A 2 Z Infra Engg. Ltd. | 2015 | 3639600 | |
| A 2 Z Infra Engg. Ltd. | 2016 | 3033350 | -53.6 |
| A 2 Z Infra Engg. Ltd. | 2017 | 10641600 | -21.6 |
| A 2 Z Infra Engg. Ltd. | 2018 | -9.6 | |
| A B G Shipyard Ltd. | 2014 | 2755645 | -405.3 |
| A B G Shipyard Ltd. | 2015 | 13449000 | -296.2 |
please help in writing a SAS code to fill the missing values with the mean of the observations of respective company
thanks in advance
PROC STDIZE.
@srikanthyadav44 wrote:
I have an unbalanced panel data with missing values.
I want to replace the missing values with mean of the time series observations of the concerned cross-sectional unit.
How to perform this function in SAS.
Thanks in advance.
read the article "Mean imputation in SAS," which contains an example. Also, read the article "3 problems with mean imputation"
to make yourself aware of how mean imputation affects subsequent analyses.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.