bbdml | R Documentation |
Maximum Likelihood for the Beta-binomial Distribution
bbdml(
formula,
phi.formula,
data,
link = "logit",
phi.link = "logit",
method = "trust",
control = list(maxit = 1000, reltol = 1e-14),
numerical = FALSE,
nstart = 1,
inits = NULL,
...
)
formula |
an object of class |
phi.formula |
an object of class |
data |
a data frame or |
link |
link function for abundance covariates, defaults to |
phi.link |
link function for dispersion covariates, defaults to |
method |
optimization method, defaults to |
control |
optimization control parameters (see |
numerical |
Boolean. Defaults to |
nstart |
Integer. Defaults to |
inits |
Optional initializations as rows of a matrix. Defaults to |
... |
Optional additional arguments for |
An object of class bbdml
.
# phyloseq example
data(soil_phylum_small)
bbdml(formula = OTU.1 ~ DayAmdmt,
phi.formula = ~ DayAmdmt,
data = soil_phylum_small)
# data frame example
seq_depth <- rpois(20, lambda = 10000)
my_counts <- rbinom(20, size = seq_depth, prob = 0.001) * 10
my_covariate <- cbind(rep(c(0,1), each = 10))
colnames(my_covariate) <- c("X1")
example_data <- data.frame("W" = my_counts, "M" = seq_depth, my_covariate)
bbdml(formula = cbind(W, M - W) ~ X1,
phi.formula = ~ X1,
data = example_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.