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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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