MC.dRay: Rayleigh distribution function

Description Usage Arguments Value Examples

Description

Compute the Rayleigh distribution function by Monte Carlo method

Usage

1
MC.dRay(x, sigma = 1, R = 10000, antithetic = TRUE)

Arguments

x

vector of quantiles

sigma

scale parameter of Rayleigh distribution

R

size of Monte Carlo method

antithetic

antithetic, if TRUE, use antithetic method

Value

vector of Rayleigh distribution functionn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
MC1<-numeric(1000)
MC2<-numeric(1000)
for(i in 1:1000) {
MC1[i]<-MC.dRay(1,antithetic = FALSE)
MC2[i]<-MC.dRay(1)
}
print(c(sd(MC1),sd(MC2)))

## End(Not run)

QinYuWu/StatComp18036 documentation built on May 12, 2019, 5:15 p.m.