condMom {bayesm}R Documentation

Computes Conditional Mean/Var of One Element of MVN given All Others

Description

condMom compute moments of conditional distribution of ith element of normal given all others.

Usage

condMom(x, mu, sigi, i)

Arguments

x vector of values to condition on - ith element not used
mu length(x) mean vector
sigi length(x)-dim covariance matrix
i conditional distribution of ith element

Details

x ~ MVN(mu,Sigma).

condMom computes moments of x_i given x_{-i}.

Value

a list containing:

cmean cond mean
cvar cond variance

Warning

This routine is a utility routine that does not check the input arguments for proper dimensions and type.

Author(s)

Peter Rossi, Graduate School of Business, University of Chicago, Peter.Rossi@ChicagoGsb.edu.

References

For further discussion, see Bayesian Statistics and Marketing by Rossi, Allenby and McCulloch.
http://faculty.chicagogsb.edu/peter.rossi/research/bsm.html

Examples

##
sig=matrix(c(1,.5,.5,.5,1,.5,.5,.5,1),ncol=3)
sigi=chol2inv(chol(sig))
mu=c(1,2,3)
x=c(1,1,1)
condMom(x,mu,sigi,2)


[Package bayesm version 2.1-2 Index]