mable.copula: Maximum Approximate Bernstein Likelihood Estimate of Copula...

View source: R/mable-copula.r

mable.copulaR Documentation

Maximum Approximate Bernstein Likelihood Estimate of Copula Density Function

Description

Maximum Approximate Bernstein Likelihood Estimate of Copula Density Function

Usage

mable.copula(
  x,
  M0 = 1,
  M,
  unif.mar = TRUE,
  pseudo.obs = c("empirical", "mable"),
  interval = NULL,
  search = TRUE,
  mar.deg = FALSE,
  high.dim = FALSE,
  controls = mable.ctrl(sig.level = 0.05),
  progress = TRUE
)

Arguments

x

an n x d matrix or data.frame of multivariate sample of size n from d-variate distribution with hyperrectangular specified by interval.

M0

a nonnegative integer or a vector of d nonnegative integers specify starting candidate degrees for searching optimal degrees.

M

a positive integer or a vector of d positive integers specify the maximum candidate or the given model degrees for the joint density.

unif.mar

logical, whether all the marginals distributions are uniform or not. If not the pseudo observations will be created using empirical or mable marginal distributions.

pseudo.obs

"empirical": use empirical distribution to create pseudo, observations, or "mable": use mable of marginal cdfs to create pseudo observations

interval

a vector of two endpoints or a 2 x d matrix, each column containing the endpoints of support/truncation interval for each marginal density. If missing, the i-th column is assigned as extendrange(x[,i]). If unif.mar=TRUE, then it is [0,1]^d.

search

logical, whether to search optimal degrees between M0 and M or not but use M as the given model degrees for the joint density.

mar.deg

logical, if TRUE (default), the optimal degrees are selected based on marginal data, otherwise, the optimal degrees are chosen by the method of change-point. See details.

high.dim

logical, data are high dimensional/large sample or not if TRUE, run a slower version procedure which requires less memory

controls

Object of class mable.ctrl() specifying iteration limit and the convergence criterion eps. Default is mable.ctrl. See Details.

progress

if TRUE a text progressbar is displayed

Details

A d-variate copula density c(u) on [0, 1]^d can be approximated by a mixture of d-variate beta densities on [0, 1]^d, \beta_{mj}(x) = \prod_{i=1}^d\beta_{m_i,j_i}(u_i), with proportion p(j_1, \ldots, j_d), 0 \le j_i \le m_i, i = 1, \ldots, d, which satisfy the uniform marginal constraints, the copula (density) has uniform marginal cdf (pdf). If search=TRUE and mar.deg=TRUE, then the optimal degrees are (\tilde m_1,\ldots,\tilde m_d), where \tilde m_i is chosen based on marginal data of u_i, $i=1,\ldots,d. If search=TRUE and mar.deg=FALSE, then the optimal degrees (\hat m_1,\ldots,\hat m_d) are chosen using a change-point method based on the joint data.

For large data and high dimensional density, the search for the model degrees might be time-consuming. Thus patience is needed.

Value

A list with components

  • m a vector of the selected optimal degrees by the method of change-point

  • p a vector of the mixture proportions p(j_1, \ldots, j_d), arranged in the column-major order of j = (j_1, \ldots, j_d), 0 \le j_i \le m_i, i = 1, \ldots, d.

  • mloglik the maximum log-likelihood at an optimal degree m

  • pval the p-values of change-points for choosing the optimal degrees for the marginal densities

  • M the vector (m1, m2, ..., md) at which the search of model degrees stopped. If mar.deg=TRUE mi is the largest candidate degree when the search stoped for the i-th marginal density

  • convergence An integer code. 0 indicates successful completion(the EM iteration is convergent). 1 indicates that the iteration limit maxit had been reached in the EM iteration;

  • if unif.mar=FALSE, margin contains objects of the results of mable fit to the marginal data

Author(s)

Zhong Guan <zguan@iu.edu>

References

Wang, T. and Guan, Z. (2019). Bernstein polynomial model for nonparametric multivariate density. Statistics 53(2), 321–338. Guan, Z., Nonparametric Maximum Likelihood Estimation of Copula

See Also

mable, mable.mvar

Examples

## Simulated bivariate data from Gaussian copula
 
 set.seed(1)
 rho<-0.4; n<-1000
 x<-rnorm(n)
 u<-pnorm(cbind(rnorm(n, mean=rho*x, sd=sqrt(1-rho^2)),x))
 res<- mable.copula(u, M = c(3,3), search =FALSE, mar.deg=FALSE,  progress=FALSE)
 plot(res, which="density") 


mable documentation built on Oct. 1, 2024, 9:06 a.m.