| coef.PLNmixturefit {PLNmodels} | R Documentation |
Extracts model coefficients from objects returned by PLN() and its variants
## S3 method for class 'PLNmixturefit'
coef(object, type = c("main", "means", "covariance", "mixture"), ...)
object |
an R6 object with class |
type |
type of parameter that should be extracted. Either "main" (default) for Θ , "means" for μ , "mixture" for π or "covariance" for Σ |
... |
additional parameters for S3 compatibility. Not used |
A matrix of coefficients extracted from the PLNfit model.
data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
myPLN <- PLNmixture(Abundance ~ 1 + offset(log(Offset)),
data = trichoptera, control_main = list(iterates = 0)) %>% getBestModel()
coef(myPLN) ## Theta - empty here
coef(myPLN, type = "mixture") ## pi
coef(myPLN, type = "means") ## mu
coef(myPLN, type = "covariance") ## Sigma