View source: R/cxr_er_bootstrap.R
cxr_er_bootstrap | R Documentation |
Computes bootstrap standard errors for a given effect/response function.
This function is provided for completeness, but error calculation is
integrated in the function cxr_er_fit
.
cxr_er_bootstrap(
fitness_model,
optimization_method,
data,
covariates,
init_par,
lower_bounds,
upper_bounds,
fixed_parameters,
bootstrap_samples
)
fitness_model |
effect/response function, see |
optimization_method |
numerical optimization method. |
data |
either a list of dataframes or a single dataframe. if 'data' is a list, each element is a dataframe with the following columns:
If 'data' is a dataframe, it also needs a 'focal' column. Regardless of the data structure, all focal species need to have the same number of observations (i.e. same number of rows), and the set of neighbour species needs to be the same as the set of focal species, so that the neighbours columns correspond to the names of the list elements or, if 'data' is a dataframe, to the values of the 'focal' column. Future versions will relax this requirement. |
covariates |
a data structure equivalent to 'data', in which each column are the values of a covariate. |
init_par |
initial values for parameters |
lower_bounds |
optional list with single values for "lambda", "effect","response", and optionally "lambda_cov", "effect_cov", "response_cov". |
upper_bounds |
optional list with single values for "lambda", "effect","response", and optionally "lambda_cov", "effect_cov", "response_cov". |
fixed_parameters |
list with values for fixed parameters, or NULL. |
bootstrap_samples |
number of bootstrap samples for error calculation. Defaults to 0, i.e. no error is calculated. |
1d vector, the standard error of each parameter in init_par
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.