-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
sample_value()will not work when usingpool = TRUE.- The approach needs to somehow replicate the functionality in but based on a single (pooled) model fit for all bin hazards.
condensier/R/SummariesModelClass.R
Lines 205 to 215 in 9e177e5
for (k_i in seq_along(private$PsAsW.models)) { sampleA_newcat <- private$PsAsW.models[[k_i]]$sampleA(newdata = newdata, ...) if (k_i == 1L) sampleA_mat[, k_i] <- sampleA_newcat # carry forward all previously sampled 1's (degenerate ones a bin a chosen for the first time) if (k_i > 1) { # if you succeeded at the previous bin, your 1L is carried through till the end: sampleA_mat[(sampleA_mat[, k_i - 1] == 1L), k_i] <- 1L # if you haven't succeeded at the previous bin, you get a chance to succeed at this category: sampleA_mat[(sampleA_mat[, k_i - 1] == 0L), k_i] <- sampleA_newcat[(sampleA_mat[, k_i - 1] == 0L)] } } - This needs to be done directly inside
BinOutModel$sampleA. One potential approach is to re-create a loop over nbins, inside the loop mutate newdata with a new bin indicator, then keep call predict for the same fit.
Metadata
Metadata
Assignees
Labels
No labels