bootstrap {CIS.DGLM} | R Documentation |
Bootstrap
Description
This function implements a custom bootstrapping procedure that utilizes bootstrapping to estimate mean and SD of stress between two environment states (A and B).
Usage
bootstrap(
dataset,
n.boot = 10^5,
variables,
stress_variable,
alpha = 0.05,
ran.seed = 12345
)
Arguments
dataset |
Data set to be utilized. |
n.boot |
Number of bootstraps to perform. Defaults to 10^5. |
variables |
List of variables from mean and variance models in DGLM. |
stress_variable |
Name of the variable with the stress values. |
alpha |
Significance level by which to determine the confidence intervals for the bootstrap estimates. Defaults to 0.05, thus creating the 95 percent confidence intervals. |
ran.seed |
Random seed value for generating different random bootstrap samples.] |
Value
Lists with confidence intervals for the bootstrap estimations for average stress in As and Bs of variables in mean model and confidence intervals for the bootstrap estimations of standard deviation of stress in As and Bs of variables in variance model.
Examples
test.data <- simu.inter.dat.interboth(n.rep = 3, n.obs.per.rep = 15, ran.seed = 1)
variables <- colnames(test.data[-1])
bootstrap(test.data, n.boot=100,variables, 'stress')
unlink(c('bootstrap mean A stress.txt','bootstrap mean B stress.txt',
'bootstrap sd A stress.txt', 'bootstrap sd B stress.txt'))