log_reg_boostrap: Logistic regression coeficients. Calculates the coefficients...

View source: R/log_reg_boostrap.R

log_reg_boostrapR Documentation

Logistic regression coeficients. Calculates the coefficients of a logistic regression. As input use an incidence matrix of host - parasite interaction and a phylogenetical distance matrix of host. It replicates the calculation of the coefficients 1000 times and gets the central tendency of the distribution of each coefficient.

Description

Logistic regression coeficients. Calculates the coefficients of a logistic regression. As input use an incidence matrix of host - parasite interaction and a phylogenetical distance matrix of host. It replicates the calculation of the coefficients 1000 times and gets the central tendency of the distribution of each coefficient.

Usage

log_reg_boostrap(incidence, phydist, n)

Arguments

incidence

Incidence binary matrix between pest - host interaction

phydist

Phylogenetic host distance matrix

n

Number of boostrap iteration

Examples

phy_dist <- ape::cophenetic.phylo(host_tree)
incidence_matrix <-  get_incidence_matrix(beetleTreeInteractions)
incidence_matrix <- incidence_matrix[ , colnames(phy_dist)]
log_reg_boostrap(incidence_matrix, phy_dist, 10)

alrobles/geotax documentation built on July 27, 2023, 4:37 a.m.