cov_nest {Rnest} | R Documentation |
Compute covariance or correlation matrix with treatments for clusters and missing values
Description
Compute covariance or correlation matrix with treatments for clusters and missing values
Usage
cor_nest(.data, ..., cluster = NULL, missing = "fiml", ordered = FALSE, pvalue = FALSE)
cov_nest(.data, ..., cluster = NULL, missing = "fiml", ordered = FALSE, pvalue = FALSE)
Arguments
.data |
a data frame, a numeric matrix. |
... |
further arguments. |
cluster |
a variable name defining the clusters in a two-level dataset in the data frame. |
missing |
treatment to deal with missing values. Options are |
ordered |
a character vector identifying which variables have an ordered (ordinal) scale. If |
pvalue |
an argument to indicate if |
Details
A quick adaptation of the lavaan package (Rosseel, 2012) to estimate a covariance or correlation matrix with missing values, hierachical strcutures and ordinal scales.
Value
A list of class "covnest"
References
Rosseel, Y. (2012). lavaan: An R package for structural equation modeling. Journal of Statistical Software, 48(2), 1–36. https://www.jstatsoft.org/v48/i02/
Examples
cov_nest(airquality)