Error in the $ linkinv (eta) family: The eta argument must be a non-empty numeric vector

The reason the question title is a mistake I get is because I just don't know how to interpret it, no matter how much I research. Whenever I run a logical regression from bigglm()(from a package biglmdesigned to run regressions over large amounts of data), I get:

Error in family$linkinv(eta) : Argument eta must be a nonempty numeric vector

This is what my function looks like bigglm():

fit <- bigglm(f, data = df, family=binomial(link="logit"), chunksize=100, maxit=10) 

Where fis the formula, and dfis the dataframe (no more than a million lines and about 210 variables).

So far, I have been trying to change my dependent variable to a number class, but that didn't work. My dependent variable has no missing values.

Judging by the error message, I am wondering if this can do anything with an argument familyin a function bigglm(). I found many other websites with people asking about the same error, and most of them were either unanswered or for a completely different case.

+4
source share
1 answer

The error Argument eta must be a nonempty numeric vectorfor me looks like this: your data has either empty values ​​or NA. So check your details. Whatever advice we give here, you cannot test until we see your code or the actions caused by the error. try it

is.na(df) # if TRUE, then replace them with 0
df[is.na(df)] <- 0 # Not sure replacing NA with 0 will have effect on your model

or any line of code causes the NAs generation argument na.rm=T

Again, we can only guess. Hope this helps.

+6

Source: https://habr.com/ru/post/1622975/


All Articles