ncn-foreigners / nonprobsvy

An R package for modern methods for non-probability surveys
https://ncn-foreigners.github.io/nonprobsvy/
Other
29 stars 4 forks source link

'data' must be a data.frame, environment, or list error then estimating using one auxiliary variable only #48

Closed LukaszChrostowski closed 5 months ago

LukaszChrostowski commented 5 months ago

Error comes from y_rand_pred <- stats::predict.glm(model_out$glm, newdata = model_frame, type = "response") - line 40 glm.R Reason - model_frame stores vector instead of data.frame. File tree of the generated error -> glm.R#40 - nonprobDR.R#454 - nonprob.R#77. Potential solution is to transform output of model_frame function in data_manip.R file

LukaszChrostowski commented 5 months ago

fixed