get_resampling_idxs | R Documentation |
Takes a vector of weights, or data frame or list containing sets of weights, and resamples indices for use in later computation.
get_resampling_idxs(x, frac = 1, replace = TRUE)
x |
A vector of weights, a list of weight vectors, or a data frame of
type |
frac |
A real number giving the fraction of draws to resample; the
default, 1, resamples all draws. Smaller values should be used when
|
replace |
Whether sampling should be with replacement. When weights
are extreme it may make sense to use |
A vector, list, or data frame, depending of the type of x
,
containing the sampled indices. If any weights are NA
, the indices
will also be NA
.
## Not run: spec = make_spec(eta ~ student_t(df, 0, 1), df=1:10) adjusted = adjust_weights(spec, eightschools_m) get_resampling_idxs(adjusted) get_resampling_idxs(adjusted, frac=0.1, replace=FALSE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.