In case of multilevel models, this PR adds two global options for "integrating out" group-level effects: projpred.mlvl_pred_new and projpred.mlvl_proj_ref_new. These refer to prediction time and projection time, respectively (the latter only affecting the reference model, not the submodels) and are explained in detail in the updated general package documentation (?`projpred-package`) from this PR. The defaults for these options are such that the former behavior is retained.
Note that "prediction time" also includes the submodel predictions from .init_submodel(), affecting KL divergence (or rather cross-entropy, i.e., output element ce) and the projected dispersion parameter values. Because of the latter, a warning is thrown when constructing a refmodel object with the final dis being not all-NAs (except for a few latent-projection cases where such a warning is not necessary).
The integration across the group-level effects is performed by considering existing group-levels from the training data as new group levels and drawing group-level effects randomly for these (for actually new group levels, drawing group-level effects randomly has already been done before).
In case of multilevel models, this PR adds two global options for "integrating out" group-level effects:
projpred.mlvl_pred_new
andprojpred.mlvl_proj_ref_new
. These refer to prediction time and projection time, respectively (the latter only affecting the reference model, not the submodels) and are explained in detail in the updated general package documentation (?`projpred-package`
) from this PR. The defaults for these options are such that the former behavior is retained.Note that "prediction time" also includes the submodel predictions from
.init_submodel()
, affecting KL divergence (or rather cross-entropy, i.e., output elementce
) and the projected dispersion parameter values. Because of the latter, a warning is thrown when constructing arefmodel
object with the finaldis
being not all-NA
s (except for a few latent-projection cases where such a warning is not necessary).The integration across the group-level effects is performed by considering existing group-levels from the training data as new group levels and drawing group-level effects randomly for these (for actually new group levels, drawing group-level effects randomly has already been done before).