# NOT RUN {
# define a mpoly object for a multivariate polynomial, and
# determine its expected value at specified mean and covariance matrix:
# t0 <- mpoly(list(c(coef=3,x1=2),c(coef=2,x1=1,x2=3),c(coef=-4,z=2),c(coef=1,x1=1,x2=2,z=1)))
# integrate.polynomial(t0,c(1,2,3),matrix(c(1,0,0,0,1,0,0,0,1),nrow=3,byrow=TRUE))
# }
Run the code above in your browser using DataCamp Workspace