Compute bootstrapped parameters and their related indices such as Confidence Intervals (CI) and p-values.
bootstrap_parameters( model, iterations = 1000, centrality = "median", ci = 0.95, ci_method = "quantile", test = "p-value", ... )
| model | Statistical model. |
|---|---|
| iterations | The number of draws to simulate/bootstrap. |
| centrality | The point-estimates (centrality indices) to compute. Character (vector) or list with one or more of these options: |
| ci | Value or vector of probability of the CI (between 0 and 1)
to be estimated. Default to |
| ci_method | The type of index used for Credible Interval. Can be
|
| test | The indices to compute. Character (vector) with one or more of these options: |
| ... | Arguments passed to or from other methods. |
Bootstrapped parameters.
This function first calls bootstrap_model to generate
bootstrapped coefficients. The resulting replicated for each coefficient
are treated as "distribution", and is passed to describe_posterior()
to calculate the related indices defined in the "test" argument.
Davison, A. C., & Hinkley, D. V. (1997). Bootstrap methods and their application (Vol. 1). Cambridge university press.
# \donttest{ library(parameters) model <- lm(Sepal.Length ~ Species * Petal.Width, data = iris) bootstrap_parameters(model)#> Parameter Coefficient CI_low CI_high p #> 1 (Intercept) 4.7766617 4.5135438 4.9897666 0.000000000 #> 2 Speciesversicolor -0.7181220 -1.6069290 0.1527264 0.105894106 #> 3 Speciesvirginica 0.5204686 -0.7304722 1.7185077 0.401598402 #> 4 Petal.Width 0.9180041 0.2656675 1.9659747 0.003996004 #> 5 Speciesversicolor:Petal.Width 0.4702195 -0.6860819 1.4379762 0.399600400 #> 6 Speciesvirginica:Petal.Width -0.2886256 -1.4616369 0.6301752 0.535464535# }