CecileProust-Lima / lcmm

R package lcmm
https://CecileProust-Lima.github.io/lcmm/
48 stars 13 forks source link

predictY with ordinal outcomes #244

Closed caterinagregorio closed 3 months ago

caterinagregorio commented 4 months ago

Dear Prof. Proust-Lima and lcmm team,

I am using the function lcmm with an ordinal outcome ( the variable is an interger), "thresholds" as link function and computeDiscrete = T. When using predictY, I expected to obtain intergers but I obtain predictions as my variable was continuous. Is that normal?

Thank you so much, best, Caterina

VivianePhilipps commented 3 months ago

Hi,

to predict your outcome, whatever its type (continuous or ordinal), you use the expectancy of the estimated distribution. The expectancy of a binary (0/1) variable is not 0 or 1, but a value between 0 and 1. In the same way, the expectancy of an ordinal outcome is not necessarily an integer, so it is normal that the predictY functions returns real values and not integers.

Viviane

caterinagregorio commented 3 months ago

Of course, it makes sense. Thanks for the reply!