[R] missing values imputation

Rolf Turner rolf at math.unb.ca
Wed May 12 21:38:13 CEST 2004


Thanks  Brian.

The EM algorithm requires an ``E'' step and an ``M'' step.  Harding
and Rossini appear to be seriously suggesting that an R function
could be written which would

	(a) Perform the E step in arbitrary contexts, and
	(b) For that given expected value, work out a procedure
	    to effect its maximization.

Or maybe they're not serious.

For the M step (b) general numerical optimization would theoretically
do the trick.  (But would be fraught with peril.)  For the E step
(a), forget it.

The point is, the EM ``algorithm'' is NOT an algorithm which could be
effected by an R function.  This is in complete contrast with
integrate() --- it's there; the code is written.  Hand integrate() an
integration problem, and it'll do it.  One of the differences is that
the input to an itegration problem is clearly defined and readily
specifiable as an R function.  The input to a general missing values
problem is amorphous.

Arguing about what constitutes an algorithm according to some
abstract definition is mindless.  If you define ``algorithm'' to suit
yourself, then the EM algorithm is an algorithm; otherwise not.

The original questioner wanted an R function to effect the EM
algorithm.  My point was that this is a silly request because such a
function would be impossible to write.

Call the EM algorithm an algorithm if it makes you happy.  But
remember that by doing so you'll mislead the naive inquirer
who will expect there to be a real live implementation of that
algorithm.  In computer (R) code.  Like integrate().

If you can write an R function to effect the EM ``algorithm'' --- in
general, not just in a special case --- you'll win the Chambers Prize
in computing and a few other things as well.


				cheers,

					Rolf Turner
					rolf at math.unb.ca




More information about the R-help mailing list