BookmarkSubscribeRSS Feed
omerzeybek
Obsidian | Level 7

Hi I have imputation of missing variables problem with my panel data

have years and employee numbers for every year but i need to replace missing values with previous year's employeee number.

However i also attached these two specific variables

could you please help me how can i do this...


image001.png
3 REPLIES 3
jakarman
Barite | Level 11

All depends what you have licenced. Eminer has a node for that.
http://support.sas.com/rnd/app/papers/multipleimputation.pdf

---->-- ja karman --<-----
ballardw
Super User

We either need a more complete data example or tell us how to get a 2007 value when there isn't one in the example data since the missing number of employees is for 2008.
And since there are multiple values of year there must be something else to align the "correct" number of imputed employees. For instance, for 2010 you have 24, 24, 31, 21 and 24 employees. If a 2011 value is missing and needs to be imputed which of the 2010 values should be used?

Doc_Duke
Rhodochrosite | Level 12

What you are asking about is called 'last observation carried forward' (LOCF).  There is an entire literature about why this approach is not statistically sound for imputation (just Google it sometime), but it is still used a lot in the social sciences.  I don't intend that as a criticism (sometimes we are 'told' what to do), but wanted to point out that LOCF is not without its detractors.

EGuide can't do LOCF with the point-and-click interface; you have to write a data step and use the LAG function (See

SAS(R) 9.4 Functions and CALL Routines: Reference, Second Edition for examples.)

If the first item is missing, then you can sort the results in descending order and do it again.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1616 views
  • 0 likes
  • 4 in conversation