run.model.fitting: run.model.fitting

Description Usage Arguments Value

View source: R/run.model.fitting.R

Description

Run model fitting procedure for either bait-to-bait or other interactions. Meant for internal use only.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
run.model.fitting(
  interaction.data,
  distance.bins = NULL,
  distribution = "negative-binomial",
  bait.to.bait = FALSE,
  adjustment.terms = NULL,
  maxit = 100,
  epsilon = 1e-08,
  cores = 1,
  trace = FALSE,
  verbose = FALSE,
  interim.data.dir = NULL
)

Arguments

interaction.data

data.table object containing interaction counts. Must contain columns distance, count, and bait_trans_count.

distance.bins

Number of bins to split distance into. Models are fit separately in each bin.

distribution

Name of distribution of the counts. Options are 'negative-binomial', 'poisson', 'truncated-poisson', and 'truncated-negative-binomial'

bait.to.bait

Logical indicating if model should be fit as bait-to-bait

adjustment.terms

Characted vector of extra terms to adjust for in the model fit

maxit

Maximum number of IWLS iterations for fitting the model (passed to glm.control)

epsilon

Positive convergence tolerance for Poisson and negative binomial models. Passed to glm.control

cores

Integer value specifying how many cores to use to fit model for cis-interactions.

trace

Logical indicating if output should be produced for each of model fitting procedure. Passed to glm.control or gamlss.control

verbose

Logical indicating whether to print progress reports.

interim.data.dir

Path to directory to store intermediate QC data and plots.

Value

Interactions data with expeceted number of interactions and p-values added.


chicane documentation built on Nov. 7, 2021, 1:07 a.m.