regression_bootstrap_CI | R Documentation |
This function will create a bootstrap confidence interval for a slope of simple linear regression or correlation between two quantitative variables.
regression_bootstrap_CI(
formula,
data,
summary_measure = c("slope", "correlation"),
confidence_level = 0.95,
number_repetitions = 100
)
formula |
Formula of the form |
data |
Data frame with columns for response and predictor variables. |
summary_measure |
Name of summary measure to return from simulations.
Allowed values are
|
confidence_level |
Confidence level for interval in decimal form. Defaults to 0.95 (95% confidence interval). |
number_repetitions |
Number of bootstrapped resamples. |
data(mtfires)
mtfires$logHect <- log(mtfires$Hectares)
regression_bootstrap_CI(logHect ~ Temperature,
data = mtfires,
summary_measure = "correlation",
confidence_level = 0.9,
number_repetitions = 1000
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.