gradients_bootstats: Use bootstrapping to estimate standard errors and confidence...

Description Usage Arguments Value Output Examples

View source: R/SelectionGradients.R

Description

gradients_bootstats allows the user to calculate the standard deviations and confidence intervals for phenotypic selection gradients that are estimated using the gradients function in psa.

Usage

1
gradients_bootstats(w, z, conf = 0.95, R = 2000, method = c(1,2))

Arguments

w

Relative fitness.

z

Phenotypic trait(s). Character values are not accepted.

conf

Confidence interval, with 95 percent confidence interval set as a default. See boot.ci for more details.

R

Number of bootstrap replicates. 2000 is set as the default. See ?boot for more details.

method

Method to estimate the selection differential. 1 = matrix algebra approach of phenotypic distributions before and after selection; 2 = ordinary least-squares regression of relative fitness against the trait; "all" = use all of the methods to produce multiple estimates.

Value

gradients_bootstats returns a list of three objects (boot output, standard errors, and confidence intervals).

Output

bootoutput contains the estimates for the phenotypic selection gradients, bias, and standard errors using an "ordinary" resampling method (see the "sim" option in boot::boot for more details)

se contains the bootstrapped standard errors.

ci contains the confidence intervals for four bootstrapping methods (basic, student, percent, and bca). See boot::boot.ci for more details.

Examples

1
2
3

MorphoFun/psa documentation built on Nov. 10, 2021, 7:01 a.m.