I used rxLogit function in Revolution R(Package RevoScaleR) to fit a logistic regression model on a data that has many categorical variables(for example STATE-IL,FL,OH,CA,TX..) and a couple of numeric variables. When I am trying to score a data using rxPredict function I am getting an error
INTERNAL ERROR: In rxPredict, the number of parameters does not match the number of variables: 16 vs. 45.
One thing I understood was, as the scoring data has only fewer categories(say data with STATE-IL). So the number of parameters provided to the model are fewer than the variables in the model.
The code that I wrote is:
winlossmodel <- rxLogit(Flag ~ price+quantity+product_group+state+mode_of_transportation+cluster, data = training_data)
winlosspredict <- rxPredict(winlossmodel, data=scoring_data,type="response",checkFactorLevels=FALSE)
Here price and quantity are continuous variables. State,product_group,mode_of_transportation and cluster are categorical variables. My training_data has data for all the states but the scoring_data has data for only few states. Is this causing the error?