get_log_reg_coefficients: Logistic regression coeficients

View source: R/get_log_reg_coefficients.R

get_log_reg_coefficientsR Documentation

Logistic regression coeficients

Description

Calculates the coefficients of a logistic regression. Use an incidence matrix of pest - host interaction and a phylogenetical distance matrix of host.

Usage

get_log_reg_coefficients(incidence, phydist)

Arguments

incidence

Incidence binary matrix between interactions (example host - parasite system)

phydist

Phylogenetic distance matrix among host

Value

A table with logistic regression coefficients

Examples

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

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