Description Usage Arguments Value Examples
This function is required to take in the relationship model from 'postpi_relate()', a validation set, and the inference formula. Through a bootstrap approach, the function quantifies biases using the relationship model and then corrects the inference results in the validation set based on the input inference formula. The default number of bootstrapping is 100 and the seed is 1234. Both parameters can be defined by users.
1 2 3 4 5 6 7 8 |
valid_dat |
validation set that contains only the predicted outcomes and covariates of interest |
rel_model |
model object created by 'postpi_relate()' |
inf_formula |
inference formula for fitting predicted outcomes ~ covariates, eg. yp ~ x1 |
method |
parametric or non-parametric method to estimate standard error of estimates. Method = "par" or "non-par". The default value is "par", parametric method. |
bs |
number of bootstrap times. The default value is 100 times. |
seed |
seed number. The default value is 1234 |
tidytable a tidy table for inference results. It contains conlumns: term, estimate, std.error, statistic, p.value
1 2 3 4 5 6 7 8 9 10 | data(RINdata,package="postpi")
testing <- RINdata[1:2000,]
validation <- RINdata[2001:nrow(RINdata),]
relation_dat <- data.frame(actual = testing$actual, predictions = testing$predictions)
relation_model <- postpi_relate(relation_dat,actual)
inf_par <- postpi(validation, relation_model, predictions ~ region_1)
inf_nonpar <- postpi(validation, relation_model, predictions ~ region_1, method = "non-par")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.