hputter / mstate

https://hputter.github.io/mstate/
7 stars 5 forks source link

Error in names(mm3) <- nms : 'names' attribute [31] must be the same length as the vector [27] #25

Closed Fabiola-Eto closed 4 months ago

Fabiola-Eto commented 1 year ago

I'm running a mstate model with a 17-by-17 transition matrix. The matrix makes sense and the numbers of events (frequencies and percentages) are correct. I ran the msprep() function smoothly as well. The issue I get stuck with is when I try to run the function expand.covs(). This error message pops out:

Error in names(mm3) <- nms : 
  'names' attribute [31] must be the same length as the vector [27]

I checked that my data is an object of class msdata as required. The covariates have no missing data, and their length is the same length as the mstata object. I tried different types of covariates (integer, numeric, factor), but the error message persisted regardless. I couldn't find a similar error for users of the mstate package, nor could find a possible explanation in the vignette.

I appreciate it if you could help me find the cause of the error. Thanks.

edbonneville commented 5 months ago

@Fabiola-Eto (apologies for delay in responding to this) were you able to find the solution to your problem? If not, could you please try to prepare a minimal reproducible example ? Thanks!

edbonneville commented 4 months ago

Will close this issue since no reproducible example given, but please do re-open if you run into something similar again.