Dear all,

i am using biglm-packages for big data to do linear Regressions and log-Regressions for probability.

In both cases i am able to run the model for regressions coefficients. I am also able to use the predict function on the data frame prediting values from said data frame.

Error:

When i use any other data frame to predict values from that one i get the following error:

Error in x %*% coef(object) : non-conformable arguments

I have made sure, that the new data frame does not contain any factorial levels which are unknow to the modell (i tried it with the "regular" lm and predict-function and it worked). As far as i understand, the Error is thrown, when the dimensions of the new data matrix is not the same as the dimension of the data matrix which was used to derive the regression coefficients. As you see my understanding is very basic.

Please point out to me, what i am doing wrong here so i can try to solve this problem.

:wave:

Reproducible Example:

Thank you all so very much!

i am using biglm-packages for big data to do linear Regressions and log-Regressions for probability.

In both cases i am able to run the model for regressions coefficients. I am also able to use the predict function on the data frame prediting values from said data frame.

Error:

When i use any other data frame to predict values from that one i get the following error:

Error in x %*% coef(object) : non-conformable arguments

I have made sure, that the new data frame does not contain any factorial levels which are unknow to the modell (i tried it with the "regular" lm and predict-function and it worked). As far as i understand, the Error is thrown, when the dimensions of the new data matrix is not the same as the dimension of the data matrix which was used to derive the regression coefficients. As you see my understanding is very basic.

Please point out to me, what i am doing wrong here so i can try to solve this problem.

:wave:

Reproducible Example:

Code:

```
## bigglm and predictfunction - Example #
require(biglm)
set.seed(42)
# create random df.
df.1<-data.frame(sell=seq(0,1,1),price=rnorm(100, mean=10000,sd=4000),blabla=rnorm(100,mean=12000,sd=5000))
df.1["fact_1"]<-as.factor(c("a","b","c","e"))
# Do the probaility regression
prob.fit<-bigglm(sell~price+blabla+fact_1,family=binomial("logit"), data=df.1) # ignore warning
summary(prob.fit)
# Do a prediction on df.1
predict(prob.fit,df.1,type="response") #works
# Do a prediction on new data which contain known variables
df.2<-data.frame(sell=c(1,0),price=c(1000,1800),blabla=c(2140,2110),fact_1=c("a", "b"))
predict(prob.fit,df.2,link="response") #Error in x %*% coef(object) : non-conformable arguments????
## Predict without bigglm
fit<-lm(sell~price+blabla+fact_1,family=binomial("logit"), data=df.1)
summary(fit)
predict(fit,df.2,type="response") # works..why not bigglm
```

Last edited: