View source: R/barp_prognostic_covs.R
barp_prognostic_covs | R Documentation |
This function extracts the relative prognostic power of the covariates used in the BARP model. The user can choose to evaluate the statistical significance of these metrics by setting perm_test to TRUE. Doing so re-esetimates variable inclusion proportions (in either trees or splits) after randomly permuting the outcome variable. These permuted inclusion proportions are used as a null distribution against which the average observed proportions are compared.
barp_prognostic_covs( barp.obj, interactions = F, perm_test = T, num_reps = 10, num_trees = 20, num_permute = 10, type = "splits", setSeed = NULL, ... )
interactions |
A logical statement for whether to evaluate individual variables or their pairwise interactions. Defaults to |
perm_test |
A logical statement for whether to evaluate covariate significance via permutation tests. Defaults to |
num_reps |
The number of reps used to estimate the average inclusion proportions and standard deviation. |
num_trees |
The number of trees to be used. |
num_permute |
The number of permutation simulations. |
type |
The context in which to evaluate the proportion of variable inclusion, either in terms of |
setSeed |
Seed to control random number generation. |
BARP |
A |
Returns an object of class "barpcov", containing a list of the following components:
covariate_importance |
A |
type |
An indicator for which |
permutation_test |
A |
p_vals |
A |
BARP
which generates the prerequisite BARP
object.
data("gaymar") barp.obj <- barp(y = "supp_gaymar", x = c("pvote","religcon","age","educ","gXr","stateid","region"), dat = svy, census = census06, geo.unit = "stateid", proportion = "n") barpcov <- barp_prognostic_covs(barp.obj, interactions = F, perm_test = T, num_reps = 30, num_trees = 20, num_permute = 30, type = 'splits')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.