Desktop productivity for business analysts and programmers

imputation problem

Posts: 65

imputation problem

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...

Valued Guide
Posts: 3,208

Re: imputation problem

All depends what you have licenced. Eminer has a node for that.

---->-- ja karman --<-----
Super User
Posts: 11,134

Re: imputation problem

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?

Trusted Advisor
Posts: 2,114

Re: imputation problem

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.

Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation