refit_boots: Refit bootstrap replicates that failed to converge in a call...

Description Usage Arguments Value Methods (by generic)

View source: R/cor_phylo.R

Description

This function is to be called on a cor_phylo object if when one or more bootstrap replicates fail to converge. It allows the user to change parameters for the optimizer to get it to converge. One or more of the resulting cp_refits object(s) can be supplied to boot_ci along with the original cor_phylo object to calculate confidence intervals from only bootstrap replicates that converged.

Usage

1
2
3
4
refit_boots(cp_obj, inds = NULL, ...)

## S3 method for class 'cp_refits'
print(x, digits = max(3, getOption("digits") - 3), ...)

Arguments

cp_obj

The original cor_phylo object that was bootstrapped.

inds

Vector of indices indicating the bootstraps you want to refit. This is useful if you want to try refitting only a portion of bootstrap replicates. By passing NULL, it refits all bootstrap replicates present in cp_obj$bootstrap$mats. Any bootstrap replicates not present in inds will have NA in the output object. Defaults to NULL.

...

Arguments that should be changed from the original call to cor_phylo. The boot argument is always set to 0 for refits because you don't want to bootstrap your bootstraps.

x

an object of class cp_refits.

digits

the number of digits to be printed.

Value

A cp_refits object, which is a list of cor_phylo objects corresponding to each matrix in <original cor_phylo object>$bootstrap$mats.

Methods (by generic)


phyr documentation built on Jan. 13, 2021, 5:40 p.m.