Learn R Programming

PLNmodels (version 1.2.2)

coef.ZIPLNfit: Extract model coefficients

Description

Extracts model coefficients from objects returned by ZIPLN() and its variants

Usage

# S3 method for ZIPLNfit
coef(object, type = c("count", "zero", "precision", "covariance"), ...)

Value

A matrix of coefficients extracted from the ZIPLNfit model.

Arguments

object

an R6 object with class ZIPLNfit

type

type of parameter that should be extracted. Either "count" (default) for \(B\), "zero" for \(B0\), "precision" for \(\Omega\), "covariance" for \(\Sigma\)

...

additional parameters for S3 compatibility. Not used

See Also

sigma.ZIPLNfit()

Examples

Run this code
data(scRNA)
# data subsample: only 100 random cell and the 50 most varying transcript
subset <- sample.int(nrow(scRNA), 100)
myPLN  <- ZIPLN(counts[, 1:50] ~ 1 + offset(log(total_counts)), subset = subset, data = scRNA)

Run the code above in your browser using DataLab