You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NB: Option 2 does work with no errors. My worries are as follows:
I have a factor variable called DMT with foour levels "DMT cat 1", "DMT cat 2", "DMT cat 3", and "DMT cat 4", where "DMT cat 4" is the reference level. This becomes an issue converting it to a numeric variables with values 1,2,3, 4, because the you cannot get separate hazards for level 1, 2, and 3 when using the constraint statement. However, using DMT as factor with 4 levels without the constraint statement produces hazards for 3 levels.
Can you sove this problem for me please? would be very much happy.
Thanks.
The text was updated successfully, but these errors were encountered:
For categorical covariates, defined as factors, specify
constraints as follows:
'list(..., covnameVALUE1 = c(...), covnameVALUE2 = c(...),
...)'
where 'covname' is the name of the factor, and 'VALUE1',
'VALUE2', ... are the labels of the factor levels (usually
excluding the baseline, if using the default contrasts).
There was actually a bug in the error handling here - there was supposed to be a warning message like the following, but this was not being triggered. I've fixed that in the development version.
Error in msm.check.constraint(constraint, mm) :
Covariate "sex" in constraint statement not in model.
For factor covariates, specify constraints using covnameCOVVALUE = c(...)
Hi Chris,
Thanks you so much for assisting me with setting up the constraint matrix. But I have a new problem on this matrix.
sex is a covariate in my mode.
I have 8 levels in the Q-matrix, some tranisitions not allowed are 2-8, 7-1, 8-1, 8-2, 8-3.
Option 1: Sex is a factor variable coded "Female", "Male"
**Option 2 : Sex is a numeric variable having values 0, 1. Sex is not Not a factor No errors whatsoever.
NB: Option 2 does work with no errors. My worries are as follows:
I have a factor variable called DMT with foour levels "DMT cat 1", "DMT cat 2", "DMT cat 3", and "DMT cat 4", where "DMT cat 4" is the reference level. This becomes an issue converting it to a numeric variables with values 1,2,3, 4, because the you cannot get separate hazards for level 1, 2, and 3 when using the constraint statement. However, using DMT as factor with 4 levels without the constraint statement produces hazards for 3 levels.
Can you sove this problem for me please? would be very much happy.
Thanks.
The text was updated successfully, but these errors were encountered: