| nl_density | R Documentation |
Computes the skew-t density from a matrix of quantiles using non-linear optimization method.
nl_density(
quantiles,
levels = c(0.05, 0.25, 0.5, 0.75, 0.95),
est_points = 512,
random_samples = 5000,
support = c(-10, 10),
seed = NULL
)
quantiles |
A matrix of quantiles. Each row represents a time observation, and each column corresponds to a quantile level. |
levels |
A numeric vector of the quantile levels corresponding to the columns of the quantile matrix (default: c(0.05, 0.25, 0.50, 0.75, 0.95)). |
est_points |
Integer. The number of evaluation points for the estimated density (default: 512). |
random_samples |
Integer. The number of random samples to draw from the fitted skew-t distribution (default: 5000). |
support |
Numeric vector of length 2. Defines the lower and upper limits of the density evaluation range. Used with |
seed |
Optional integer to set the random seed for reproducibility. |
An object of class "fars_density", which is a list containing:
A matrix of estimated densities for each time period (rows) across estimation points (columns).
A matrix of random draws from the fitted skew-t distribution for each time period.
The optimization method used (either 'nloptr' or 'optim').
The sequence of evaluation points used to compute the density. Useful for plotting.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.