PNP_fit {mistr} | R Documentation |
Fitting a Pareto-Normal-Pareto Model
Description
GNG_fit
is used to fit three components composite models with components Pareto, normal and Pareto.
Usage
PNP_fit(
data,
start = c(break1 = -0.02, break2 = 0.02, mean = 0, sd = 0.012),
...
)
Arguments
data |
vector of values to which the density is optimized. |
start |
named vector (break1, break2, mean, sd) of values that are used to start the optimization, default: c(break1 = -0.02, break2 = 0.02, mean = 0, sd = 0.012). |
... |
further arguments to be passed to optimizer. |
Details
The PNP model is the Pareto-Normal-Pareto model. This means
that a -X
transformation of a Pareto random variable will be used for the left tail,
normal distribution for the center and again Pareto for the right tail.
The code uses the maximum likelihood estimation technique to estimate the four parameters from the start vector
(break1, break2, mean, sd
). The other parameters (shape parameters of Pareto distribution) are
computed in each step such that the function is continuous. Weights are estimated in every step as a proportion
of points that correspond to each of the truncated region.
Optimization is handled by the mle2
function.
Value
A list of class comp_fit.
See Also
Examples
## Not run:
PNP_fit(stocks$SAP)
PNP_fit(stocks$MSFT)
autoplot(PNP_fit(stocks$ADS))
PNP_fit(stocks$GSPC, method = "BFGS")
PNP_fit(stocks$DJI, start = c(-0.01,0.01,0,0.008))
## End(Not run)