SI.MVM: Mean Value Method

Description Usage Arguments Value Examples

Description

Mean Value Method

Usage

1
SI.MVM(h, from, to, N)

Arguments

h

Density function to be integrated

from

The start point

to

The end point

N

The number of trials

Value

I

Approximated integration

Var

Estimated variance

Examples

1
2
3
4
5
6
7
8
9
## To integrate exp(x) from -1 to 1
set.seed(0)
h <- function(x){
    exp(x)
}
N <- 100000
MVMresult <- SI.MVM(h,-1,1,N)
I2 <- MVMresult[[1]]
VarI2 <- MVMresult[[2]]

SI documentation built on May 2, 2019, 1:43 p.m.