Description Usage Arguments Value
View source: R/flexmix_poor_fit_Y.R
#' this wrapper assumes a model has been fit relative to the 2 mode mixture
of linear regression (similar to flexmix
) for the underlying mass
non-conformal mass scores
1 2 3 4 5 6 7 8 | simulation_conformal_scores_mix_reg(
x,
y,
model_params,
sim_num = 100,
h = 0.4,
grid = seq(-15, 15, by = 0.01)
)
|
x |
true x |
y |
true y |
model_params |
list of model parameters of with names as follows
that represent a conditional distribution defined by y ~ p1 M1(x) + p2 M2(x) where (M1,M2)(x) ~ right_intercept + N(right_beta*x, right_sd) and (p1,p2) = right_proportions |
sim_num |
number of simulations to base the kernel density estimate of the cde |
h |
kernel density estimate bandwidth parameter |
grid |
discretizes grid that y should range over (needs to be equally spaced) |
a data.frame with 3 columns (and 1 row)
non_conformal_mass_full_sim_based
:Estimated amount of mass
with CDE above y
value using just the simulations.
empirical_cde
:Estimated CDE value.
non_conformal_mass_ecde_and_sim_based
:Estimated amount of
mass with CDE above y
value (using grid
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.