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...
All depends what you have licenced. Eminer has a node for that.
http://support.sas.com/rnd/app/papers/multipleimputation.pdf
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?
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.