Open ljwright opened 5 years ago
Thanks Liam. When I run your code though, I don't get an error with either run. I get lots of warning messages about checkwz and tfun, but I think these are caused by issues with the mlogit fit for the Species variable in this dataset.
Are you using the latest version of R and smcfcs?
I'm running R v3.5.1 and smcfcs v1.4.0
Hi,
I've been trying to use smcfcs in R on a Stata dataset I've imported with
haven
. I think the class of the dataset is producing errors when trying to impute factor variables. (haven
adds the following to the class attribute:"tbl_df" "tbl" "data.frame"
.)In the example below, the first callof
smcfcs
succeeds while the second one fails with the warning"Variables to be imputed using method modds must be stored as factors."
. Changing the method topodds
also fails.Thanks,
Liam