Take_expected_value: Calculates the expected value - (H_{lambda}(S))

Description Usage Arguments Details Author(s) See Also Examples

View source: R/Take_expected_value.R

Description

This function calculates the expected value of supremum for Wiener process, which is also known as

H_{λ}(S))=\mathbb{E}\exp(\sup(√{2}W_{t}-t))

Usage

1
2
Take_expected_value(interval_end = 1, points = 100,
  number_of_trajectories = 1000)

Arguments

interval_end

Describes the end of interval on which expression(H_\lambda(S)) should be calculated. Default is 1.

points

Tells on how many points should the maximum be estimated. Points are spread evenly.

number_of_trajectories

Determines the number of trajectory realizations on which the expected values is estimated by taking a mean of those realizations.

Details

Marcin ma mala palke

Author(s)

Marcin Kosi?ski, m.p.kosinski@gmail.com

See Also

Other Rpickands: Rpickands-package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
Take_expected_value(10,100,1000)

# Parallel computing
library(parallel)
cl <- makeCluster(detectCores())
clusterEvalQ(cl, library(Rpickands))
system.time({
  m <- parLapply(cl, 1:100,Take_expected_value,
                copy_number=100000,points=1000)
})
stopCluster(cl)

#####HUGE SIMULATION#####
m1 <- vector("list", 100)
library(parallel)
cl <- makeCluster(detectCores())
clusterEvalQ(cl, library(Rpickands))
system.time({
   m1 <- parLapply(cl, 1:100,Take_expected_value, copy_number=100000,points=10000)
})
stopCluster(cl)

MarcinKosinski/Simulations documentation built on May 7, 2019, 2:48 p.m.