Hi Everyone. I attempted a regression analysis. After buidling a model to run it, I encountered this error message. Any ideas what it could mean and best approach to solve it ?
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in 'y'
In addition: Warning message:
In storage.mode(v) <- "double" : NAs introduced by coercion
You have either NaN or Inf values in your data (I don't think NA should be a problem, but I could be wrong, wouldn't be the first or last time). Search your data for them (see ?is.nan, ?is.infinite and ?is.na). You can replace them with NA and the regression should then drop them automatically I believe, or you can just remove those observations yourself.