Detailed description |
When user supplies coefficients to makeSurvObj(), they are silently ignored and random values are used instead. Reprex:
set.seed(3204)
sv1 <- IPMpack::.createSurvObj(Formula = surv ~ size + covariate, coeff = c(1, 1, 1))
sv1@fit$coefficients # NOT equal to user-supplied values
sv2 <- IPMpack::.createSurvObj(Formula = surv ~ size + covariate, coeff = c(1, 1, 1))
sv2@fit$coefficients # different coefficients, still NOT equal to user-supplied values
I've attached a patched version of this function (new code on line 17).
source("hidden.createSurvObj.R")
sv3 <- .createSurvObj(Formula = surv ~ size + covariate, coeff = c(1, 1, 1))
sv3@fit$coefficients # works |
|