condMom {bayesm} | R Documentation |
condMom
compute moments of conditional distribution of ith element of normal given
all others.
condMom(x, mu, sigi, i)
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 |
x ~ MVN(mu,Sigma).
condMom
computes moments of x_i given x_{-i}.
a list containing:
cmean |
cond mean |
cvar |
cond variance |
This routine is a utility routine that does not check the input arguments for proper dimensions and type.
Peter Rossi, Graduate School of Business, University of Chicago, Peter.Rossi@ChicagoGsb.edu.
For further discussion, see Bayesian Statistics and Marketing
by Allenby, McCulloch, and Rossi.
http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html
## 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)