View source: R/binary_search_mcr.r
For general model classes, returns an augmented ("full") dataset, containing the original dataset, in addition to terms used to approximate or calculate e_switch. Warning: computational resources required are proportional to n times nrep_sample.
1 2 | get_full_sample(y, X, p1, n = length(y), nrep_sample = 2, seed = 0,
warn_dropped = TRUE)
|
y |
outcome vector |
X |
covariate matrix |
p1 |
indeces for the variables to be switched |
n |
original sample size |
nrep_sample |
setting 'nrep_sample=2' corresponds to using e_divide to approximate e_switch. Increasing 'nrep_sample' further increases the number of terms used in the approximation of e_switch. If 'nrep_sample =n,' all permutations are returned. |
seed |
seed used for random permuations of the sample |
warn_dropped |
whether to give a warning if nrep_sample does not divide evenly into n. In this case, some number of observations (less than nrep_sample) will be dropped. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.