imputeY: impute Y.

Description Usage Arguments Examples

Description

given a multivariate normal with mean mu and covariance matrix sig, and a vector of observations y, impute the missing values in y and the corresponding conditional covariance matrix

Usage

1
imputeY(y, sig, mu)

Arguments

y
sig
mu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function( y, sig, mu )
{
    n <- length( y ); nm < -is.na( y )
    indi <- which( !nm ); v <- matrix( 0, n, n )
    cs <- condiStat( sig, mu, y[indi], indi )
    y[nm] <- cs$cmean; v[nm,nm] <- cs$cdisp
    return( list( yimp = y, vimp = v ) )
  }

mnbem documentation built on May 2, 2019, 6:16 p.m.

Related to imputeY in mnbem...