bcnsm_fit | R Documentation |
Fit a multivariate Box-Cox symmetric distribution generated by an NSM copula via maximum likelihood.
bcnsm_fit(
y,
association = c("unstructured", "uniform", "nonassociative"),
copula = c("gaussian", "t", "slash", "hyp"),
delta = NULL,
margins = "bcno",
control = control_fit(...),
...
)
y |
a matrix with the sample observations. |
association |
one of |
copula |
character; informs which normal scale mixture distribution should be used to generate
the NSM copula. Currently, the copulas available are: Gaussian ( |
delta |
possible extra parameter associated with the mixing distribution of the copula.
For example, the degrees of freedom of the t copula, or the heavy tailness parameter of the
slash or the hyperbolic copula. To estimate the value of |
margins |
a character or a character vector; specifies the marginal BCS distributions.
If all BCS margins are the same, it is sufficient to enter only one character. A table with
the current available BCS distributions can be seen in |
control |
a list of control arguments specified via |
... |
further arguments passed to |
The bcnsm_fit
returns an object of class "bcnsm"
,
which consists of a list with the following components:
vectors with the estimated values for mu
, sigma
,
lambda
, and nu
, respectively.
the estimated parameters of the association matrix, if any.
a character vector with the marginal BCS distributions of the fit.
structure of the association matrix. It can be one of "non-associative"
,
"unstructured"
, or "uniform"
.
"copula"
is a character which informs which normal scale mixture distribution
was used to generate the NSM copula and "delta"
is the possible extra parameter associated with
the copula.
log-likelihood of the fitted model.
asymptotic covariance matrix of the maximum likelihood estimator of the model parameters vector. Specifically, the inverse of the observed information matrix, obtained via numeric Hessian matrix.
the response matrix.
control optimization parameters used by control_fit
.
the number of observations in the sample and the dimension of the response variable, respectively.
the function call.
Rodrigo M. R. de Medeiros <rodrigo.matheus@live.com>
Vanegas, L. H., and Paula, G. A. (2016). Log-symmetric distributions: statistical properties and parameter estimation. Brazilian Journal of Probability and Statistics, 30, 196-220.
Ferrari, S. L. P., and Fumes, G. (2017). Box-Cox symmetric distributions and applications to nutritional data. AStA Advances in Statistical Analysis, 101, 321-344.
Medeiros, R. M. R. de, and Ferrari, S. L. P. (2023). Multivariate Box-Cox symmetric distributions generated by a normal scale mixture copula.
## Not run:
## Random sampling
### Sample size and dimension
n <- 200
d <- 4
### Association matrix
Gamma <- matrix(0.8, d, d)
diag(Gamma) <- 1
### Marginal specifications
margins <- c("bcno", "lt", "bct", "lno")
mu <- c(19, 20, 15, 20)
sigma <- c(0.2, 0.3, 0.4, 0.3)
lambda <- c(-1, NA, 1.6, NA)
nu <- c(NA, 4, 8, NA)
### Copula
copula <- "t"
delta <- 4
### Observations
set.seed(123) # Seed for reproducibility
y <- rbcnsm(n, mu, sigma, lambda, nu, Gamma, copula, delta, margins)
colnames(y) <- c("y1", "y2", "y3", "y4")
### Visualization (based on graphics::pairs functions)
mvplot(y)
## Fit with Gaussian copula and uniform structure
fit <- bcnsm_fit(y, association = "uniform", copula = "gaussian",
margins = c("bcno", "lt", "bct", "lno"))
class(fit)
methods(class = "bcnsm")
# Fit summaries
fit
summary(fit)
# Fit visualization
## Bivariate fit
plot(fit)
## Marginal fit
plot(fit, type = "margins")
## Transformed vectors
plot(fit, "epsilon")
# Choose the value of the extra parameter of the t copula (it can be slow)
fit_t <- choose_copula(fit, grid = 1:8, copula = "t")
## Final fit
final_fit <- fit_t[[4]]
final_fit
plot(final_fit)
plot(final_fit, type = "margins")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.