[R] Integration of functions with a vector argument
Levine, Michael
m|ev|n@ @end|ng |rom purdue@edu
Tue Jun 11 20:44:08 CEST 2024
Hello all,
I have a question concerning integration of a function of a multivariate argument with respect to one or more variables in r. Let us say we have a function
F <- function(x){ body of the function}
Where x is, in general, a d by 1 vector with d>1. Now I want to integrate out some of the coordinates of x, e.g. x[1] or x[2] or both of them etc. I'm well aware of how to integrate out e.g. y if a function is defined as f <- function (x,y) {body of the function} where y is a scalar.
However, it seems to be quite difficult to do the same if the function is defined with a vector argument x. At the very least, I haven't seen any good examples of this being done.
Any suggestions?
Yours sincerely,
Michael
Michael Levine
Associate Professor, Statistics
Department of Statistics
Purdue University
250 North University Street
West Lafayette, IN 47907 USA
email: mlevins using purdue.edu
Phone: +1-765-496-7571
Fax: +1-765-494-0558
URL: www.stat.purdue.edu/~mlevins
[[alternative HTML version deleted]]
More information about the R-help
mailing list