cor_phylo
R/cor_phylo.R
refit_boots.Rd
This function is to be called on a cor_phylo
object if 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.
The original cor_phylo
object that was bootstrapped.
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
.
If, in the original call to cor_phylo
, keep_boots
was set to
"fail"
, then any successful replicates cannot be refit here.
An error will be thrown if you use inds
to request a successful rep
to be refit when keep_boots
was set to "fail"
.
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.
an object of class cp_refits
.
the number of digits to be printed.
A cp_refits
object, which is a list of cor_phylo
objects
corresponding to each matrix in <original cor_phylo object>$bootstrap$mats
.
print(cp_refits)
: prints cp_refits
objects