PNP_fit | R Documentation |
GNG_fit
is used to fit three components composite models with components Pareto, normal and Pareto.
PNP_fit( data, start = c(break1 = -0.02, break2 = 0.02, mean = 0, sd = 0.012), ... )
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. |
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.
A list of class comp_fit.
mle2
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.