condiStat: conditional statistics

Description Usage Arguments Examples

Description

given a multivariate normal with mean mu and covariance matrix sig, compute the conditional mean and variance if we fix the variables indexed with indi to be equal to z

Usage

1
condiStat(sig, mu, z, indi)

Arguments

sig
mu
z
indi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##---- 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( sig, mu, z, indi )
{
    m  <- nrow( sig ); jndi <- ( 1:m )[-indi]
    mv <- rep( 0, m ); mv[indi] <- mu[indi] - z; mv[jndi] <- mu[jndi]
    aa <- sweeper( cbind( sig, mv ), indi )
    return( list( cmean = aa[jndi,m+1], cdisp = aa[jndi,jndi] ) )
  }

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

Related to condiStat in mnbem...