Description Usage Arguments Details Value Examples
View source: R/main_uscale_search.R
It turns out with limited precision, scale change in ruin_prob_ls
has a huge impact on the calculation.
With good u_scale
, reliable ruin_prob_ls
is computed.
1 | uscale_search(n = 100, .cand = NULL, ...)
|
n |
Numerical of length 1, valued at least 2. Default to be 100. Ignore if |
.cand |
Numerical vector of length at least 2. Candidates for |
... |
Other arguments to be passed to |
This function tries different values of u_scale
and attach the corresponding ruin_prob_ls
value and the
error of ruin_prob_ls(u=0,t=Inf)
. A table is then return to assist to either chosing u_scale
for
a separate run of ruin_prob_ls
, or decision for a value for the ruin probability
(if the top values are close to each other).
It can take some time depending on the value of n
and the family
used.
A data.frame object with columns "u_scale", "res" and "err", sorted in the absolute value of "err".
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(pruin)
## reliable example (small "err", top "res" are close and reasonable)
e <- exponential()(beta=1)
uscale_search(n=20,u=10,t=2,c=1.1,lambda=1,family=e)
## unreliable example (large "err", "res" unreasonable)
g <- gig()(a=0.32497,b=0.61543,alpha=-0.75)
uscale_search(n=20,u=4,t=4,c=1.1,lambda=1,family=g)
## default n is 100. It takes some time to run
## Not run:
uscale_search(u=4,t=4,c=1.1,lambda=1,family=g) # no need to specify n
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.