Model based ordination with Gaussian copulas
cord.Rd
Model based ordination with Gaussian copulas
Arguments
- obj
object of either class
manyglm
, ormanyany
with ordinal modelsclm
- nlv
number of latent variables (default = 2, for plotting on a scatterplot)
- n.samp
integer (default = 500), number of sets residuals used for importance sampling (optional, see detail)
- seed
integer (default = NULL), seed for random number generation (optional)
Value
loadings
latent factor loadings
scores
latent factor scores
sigma
covariance matrix estimated with nlv
latent variables
theta
precision matrix estimated with nlv
latent variables
BIC
BIC of estimated model
logL
log-likelihood of estimated model
Details
cord
is used to fit a Gaussian copula factor analytic model to multivariate discrete data, such as co-occurrence (multi species) data in ecology. The model is estimated using importance sampling with n.samp
sets of randomised quantile or "Dunn-Smyth" residuals (Dunn & Smyth 1996), and the factanal
function. The seed is controlled so that models with the same data and different predictors can be compared.
References
Dunn, P.K., & Smyth, G.K. (1996). Randomized quantile residuals. Journal of Computational and Graphical Statistics 5, 236-244.
Popovic, G. C., Hui, F. K., & Warton, D. I. (2018). A general algorithm for covariance modeling of discrete data. Journal of Multivariate Analysis, 165, 86-100.
Examples
abund <- spider$abund
spider_mod <- stackedsdm(abund,~1, data = spider$x, ncores=2)
spid_lv=cord(spider_mod)
plot(spid_lv,biplot = TRUE)