| cencov | R Documentation |
Correlation and covariance matrices from censored data
cencov(x, u)
cencor(x, u)
x |
a numeric matrix |
u |
a numeric matrix giving corresponding points of left-censoring |
For cencov() a covariance matrix is returned and for
cencor() a correlation matrix is returned. Note that cencov()
calls cencor(). Estimates are based on assuming values are from a
multivariate Gaussian distribution.
a matrix
cov and cor for uncensored estimates.
# generate some correlated data
n <- 1e2
x <- rnorm(n)
y <- 0.25 * x + sqrt(0.75) * rnorm(n)
xy <- cbind(x, y)
# threshold of zero for left-censoring
u <- matrix(0, n, 2)
# left-censored correlation matrix
cencor(xy, u) # could check with cor(xy)
# left-censored covariance matrix
cencov(xy, u)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.