View source: R/PLNmixturefit-S3methods.R
sigma.PLNmixturefit | R Documentation |
Extract the variance-covariance matrix of the residuals, usually noted
\Sigma
in PLN models. This captures the correlation between the species in the latent space. or PLNmixture, it is a weighted mean of the variance-covariance matrices of each component.
## S3 method for class 'PLNmixturefit'
sigma(object, ...)
object |
an R6 object with class |
... |
additional parameters for S3 compatibility. Not used |
A semi definite positive matrix of size p, assuming there are p species in the model.
coef.PLNmixturefit()
for other ways to access
\Sigma
.
data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
myPLN <- PLNmixture(Abundance ~ 1 + offset(log(Offset)),
data = trichoptera, control = PLNmixture_param(smoothing = "none")) %>% getBestModel()
sigma(myPLN) ## Sigma
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.