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.

# S3 method for PLNfit
sigma(object, ...)

Arguments

object

an R6 object with class PLNfit

...

additional parameters for S3 compatibility. Not used

Value

A semi definite positive matrix of size p, assuming there are p species in the model.

See also

coef.PLNfit(), standard_error.PLNfit() and vcov.PLNfit() for other ways to access $$\Sigma$$.

Examples

data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
myPLN <- PLN(Abundance ~ 1 + offset(log(Offset)), data = trichoptera)
#> 
#>  Initialization...
#>  Adjusting a full covariance PLN model with nlopt optimizer
#>  Post-treatments...
#>  DONE!
sigma(myPLN) ## Sigma
#>              Che          Hyc         Hym         Hys           Psy
#> Che  2.527734257 -0.009344912  0.36051824  0.44484795 -0.0177734746
#> Hyc -0.009344912  1.910233618  0.11088664  0.27018082 -0.1462163407
#> Hym  0.360518238  0.110886639  1.24495205  0.86538169 -0.1181925716
#> Hys  0.444847950  0.270180821  0.86538169  2.66399438 -0.1462741758
#> Psy -0.017773475 -0.146216341 -0.11819257 -0.14627418  0.0759307105
#> Aga  0.308896948 -0.131967970  0.51391634  0.42593658  0.0012211584
#> Glo  0.089322923  0.171495067  0.20978700  0.34286134 -0.0496295747
#> Ath  0.352173438  0.110019742  0.38547548  0.60776202 -0.0477698766
#> Cea -0.008878925  0.005234362 -0.02004892 -0.01511599  0.0002358211
#> Ced  0.337660962  0.221739019  0.50810182  0.68112227 -0.0979195090
#> Set -0.059203176  0.477452532 -0.18250369  0.13822860 -0.0912550351
#> All  0.272620279 -0.263659047  0.68131546  0.37023031 -0.0047654768
#> Han -0.182549673  0.624603685  0.20959838  0.13522918 -0.2880156121
#> Hfo -0.362666693  0.560916354 -0.39290753 -0.18177430 -0.1457770643
#> Hsp -0.442015708  0.672963257 -0.33247332 -0.17520759 -0.1912863865
#> Hve  0.312235381 -0.131799658  0.16117708  0.24151549  0.0456368106
#> Sta  0.363864989  0.256329406  0.47804168  0.61396464 -0.1211635529
#>              Aga          Glo         Ath           Cea          Ced
#> Che  0.308896948  0.089322923  0.35217344 -0.0088789246  0.337660962
#> Hyc -0.131967970  0.171495067  0.11001974  0.0052343620  0.221739019
#> Hym  0.513916344  0.209787004  0.38547548 -0.0200489228  0.508101818
#> Hys  0.425936581  0.342861341  0.60776202 -0.0151159854  0.681122272
#> Psy  0.001221158 -0.049629575 -0.04776988  0.0002358211 -0.097919509
#> Aga  1.101329015 -0.063976931  0.19729936 -0.0208664652  0.219302536
#> Glo -0.063976931  1.120407358  0.22533155  0.0015808456  0.226510499
#> Ath  0.197299360  0.225331547  1.37536750 -0.0063345101  0.442930801
#> Cea -0.020866465  0.001580846 -0.00633451  0.0397071415 -0.007104494
#> Ced  0.219302536  0.226510499  0.44293080 -0.0071044940  0.958290847
#> Set -0.301448464  0.293179694  0.09734287  0.0142972408  0.194585282
#> All  0.593013434 -0.077512635  0.08818927 -0.0232183144  0.080595332
#> Han -0.171202850 -0.189551382 -0.19804638  0.0040281866  0.056140581
#> Hfo -0.812343591  0.301903024 -0.15669801  0.0253502943 -0.130651021
#> Hsp -0.778390992  0.253430490 -0.21589934  0.0235352583 -0.111622405
#> Hve  0.186494772  0.088853993  0.24227274 -0.0065590062  0.204391103
#> Sta  0.440269567  0.016316541  0.30820766 -0.0127951026  0.434550743
#>             Set          All          Han         Hfo         Hsp          Hve
#> Che -0.05920318  0.272620279 -0.182549673 -0.36266669 -0.44201571  0.312235381
#> Hyc  0.47745253 -0.263659047  0.624603685  0.56091635  0.67296326 -0.131799658
#> Hym -0.18250369  0.681315458  0.209598384 -0.39290753 -0.33247332  0.161177077
#> Hys  0.13822860  0.370230310  0.135229185 -0.18177430 -0.17520759  0.241515491
#> Psy -0.09125504 -0.004765477 -0.288015612 -0.14577706 -0.19128639  0.045636811
#> Aga -0.30144846  0.593013434 -0.171202850 -0.81234359 -0.77839099  0.186494772
#> Glo  0.29317969 -0.077512635 -0.189551382  0.30190302  0.25343049  0.088853993
#> Ath  0.09734287  0.088189274 -0.198046381 -0.15669801 -0.21589934  0.242272738
#> Cea  0.01429724 -0.023218314  0.004028187  0.02535029  0.02353526 -0.006559006
#> Ced  0.19458528  0.080595332  0.056140581 -0.13065102 -0.11162240  0.204391103
#> Set  1.58439691 -0.683088983 -0.041273606  0.80829421  0.76580060 -0.040550618
#> All -0.68308898  1.807884367  0.030686503 -0.74037811 -0.65689259  0.146650120
#> Han -0.04127361  0.030686503  3.638537325  0.62029959  0.98330036 -0.599857329
#> Hfo  0.80829421 -0.740378110  0.620299594  2.73416103  1.62460903 -0.342100299
#> Hsp  0.76580060 -0.656892592  0.983300363  1.62460903  2.50055205 -0.479932944
#> Hve -0.04055062  0.146650120 -0.599857329 -0.34210030 -0.47993294  1.349838767
#> Sta  0.05520256  0.200075142  0.463419896 -0.25543593 -0.19278867  0.143566347
#>             Sta
#> Che  0.36386499
#> Hyc  0.25632941
#> Hym  0.47804168
#> Hys  0.61396464
#> Psy -0.12116355
#> Aga  0.44026957
#> Glo  0.01631654
#> Ath  0.30820766
#> Cea -0.01279510
#> Ced  0.43455074
#> Set  0.05520256
#> All  0.20007514
#> Han  0.46341990
#> Hfo -0.25543593
#> Hsp -0.19278867
#> Hve  0.14356635
#> Sta  1.02964763