'r: variable was fitted with type "numeric" but type "character" was supplied by using cmest() function in R

I try to fit following cmest () function in R

exp3 <- cmest(data = m.mediation.pbmi, model = "rb", full = TRUE, outcome = "over", 
          exposure = "parent_prim_bin", mediator = "pbmi", basec = c("migr_all", "age"), 
          EMint = FALSE, mreg = list("linear"), yreg = "logistic", 
          astar = 0, a = 1, mval = list("M1_0"), estimation = "imputation", 
          inference = "bootstrap",  nboot = 10, boot.ci.type = "bca")

The data a provided by a SPSS file and in the data description for the variable pbmi is provided that this is a numerical variable with attr(*, "format.spss")=chr.

Any ideas to solve this problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source