Description Usage Arguments Examples
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
1 | condiStat(sig, mu, z, indi)
|
sig |
|
mu |
|
z |
|
indi |
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] ) )
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.