cencov {deform}R Documentation

Correlation and covariance matrices from censored data

Description

Correlation and covariance matrices from censored data

Usage

cencov(x, u)

cencor(x, u)

Arguments

x

a numeric matrix

u

a numeric matrix giving corresponding points of left-censoring

Details

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.

Value

a matrix

See Also

cov and cor for uncensored estimates.

Examples


# 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)


[Package deform version 1.0.0 Index]