BookmarkSubscribeRSS Feed
srikanthyadav44
Quartz | Level 8

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.

4 REPLIES 4
srikanthyadav44
Quartz | Level 8

Dear Mr. Draycut. thanks for your prompt response.

 

the format of my data is as follows 

Company_NameyearTotal_remunerationCapex
20 Microns Ltd.20143916000160
20 Microns Ltd.20153916000 
20 Microns Ltd.2016423000060.9
20 Microns Ltd.2017496138751.4
20 Microns Ltd.20184932459162.3
3I Infotech Ltd.2012 6866.4
3I Infotech Ltd.2013133600009267.5
3I Infotech Ltd.201423480000821
3I Infotech Ltd.201517780000 
3I Infotech Ltd.20172700000011.2
3I Infotech Ltd.20181930304513.9
63 Moons Technologies Ltd.201538726562-2.5
63 Moons Technologies Ltd.2016 22.8
63 Moons Technologies Ltd.2017390200040
63 Moons Technologies Ltd.20181725700072.7
A 2 Z Infra Engg. Ltd.20153639600 
A 2 Z Infra Engg. Ltd.20163033350-53.6
A 2 Z Infra Engg. Ltd.201710641600-21.6
A 2 Z Infra Engg. Ltd.2018 -9.6
A B G Shipyard Ltd.20142755645-405.3
A B G Shipyard Ltd.201513449000-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  

Reeza
Super User

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.


 

Rick_SAS
SAS Super FREQ

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 4 replies
  • 1038 views
  • 3 likes
  • 4 in conversation