[R-lang] Re: How to handle missing data when I try to log-transform my data

Steven Piantadosi piantado@mit.edu
Wed Jun 23 11:53:53 PDT 2010



> Thank you for the helpful explanations. I really do not know the
> theoretical reasons behind replacing values smaller than 100ms with 0.
> I vaguely recall that I read a couple of journal articles where the
> authors resorted to this method. 

It's possible what you are remembering is that one (archaic?) technique
for missing data is to replace it with the mean of the condition, or
perhaps the overall mean. If you are doing stats on z-scored RTs instead
of raw or just log rts, then 0 would be the mean (though you would
change to 0 after taking logs and z-scoring, not before).

It's much  better, though to use lmer or something else which can
handle unbalanced designs, and change these to NAs. By the way, there is
an easy syntax for this in R (that I didn't know about for a while):

d$rt[d$rt < 100] <- NA

if d is your data table and "rt" is your column of RTs

++Steve




More information about the ling-r-lang-L mailing list