Unless there is a reason not to consider multi-state models with covariate interactions, then a fix for this could be to exclude interaction terms from the list of covnames, e.g. by replacing:
attr(dat,"covnames.q")
with:
attr(dat, "covnames.q")[!grepl(":", attr(dat, "covnames.q"))]
Running pearson.msm for a fitted model with covariate interactions results in an error.
Reproducible example:
The error occurs on this line of the function: https://github.com/chjackson/msm/blob/4a131f07bff9f978bd5660fcfedeb91ef722543e/R/pearson.R#L262
Unless there is a reason not to consider multi-state models with covariate interactions, then a fix for this could be to exclude interaction terms from the list of covnames, e.g. by replacing:
attr(dat,"covnames.q")
with:attr(dat, "covnames.q")[!grepl(":", attr(dat, "covnames.q"))]