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

Description Usage Arguments Value Output Examples

View source: R/SelectionDifferentials.R

Description

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

Usage

1
differentials_bootstats(w, z, conf = 0.95, R = 2000, method = c(1,2,3,4))

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 = covariance of relative fitness to the trait; 2 = differences in mean, variance, and covariance before and after selection; 3 = matrix algebra approach of phenotypic distributions before and after selection; 4 = ordinary least-squares regression of relative fitness against the trait.

Value

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

Output

bootoutput contains the estimates for the phenotypic selection differentials, bias, and standard errors using an "ordinary" resampling method (see the "sim" option in ?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.ci for more details.

Examples

1
2
3

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