I am trying to run a linear regression model with fractional exponents for about 19000 columns of data, but I keep getting this error:

 Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
  0 (non-NA) cases 

The basic linear regression function y~x works perfectly, but the linear regression function I want to try, y~ x + y^(1/3) gives me the above error.

I've tried removing all the NA columns using na.exclude/na.omit but they do not work. I had to do use na.omit() from an original set of data for the basic linear regression model, but the new dataset doesn't work with the new linear regression model.

Here is my function:

reg1 <- lapply(1:19914, function (x) summary(lm(Everything.ver2[,x+1] ~ Everything.ver2[,"VWRETD"] + I(Everything.ver2[,x+1]^(1/3))))$coefficients)

I expect it to run a regression using the new model, but it instead gives me the error above. I would greatly appreciate help!

Your Answer


Browse other questions tagged or ask your own question.