
RVineMLE(data, RVM, start=RVM$par, start2=RVM$par2, maxit=200, max.df=30,
max.BB=list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1)),
grad=FALSE, hessian=FALSE, se=FALSE, ...)
RVineMatrix
object including the structure and the pair-copula families and parameters (if known).RVineSeqEst
; default: start = RVM$pa
RVineSeqEst
maxit = 500
).max.df = 30
; for more details see BiCopEst
).max.BB = list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1))
).RVineGrad
; default: grad = FALSE
).hessian = FALSE
). Note that this is not the Hessian Matrix calculated via RVineHessian
but via finite diffse = FALSE
).optim
(e.g. factr
controls the convergence of the "L-BFGS-B" method, or
trace
, a non-negative integer, determines if tracing information on the progress of the optimization is produced.)
ForRVineMatrix
object with the calculated parameters stored in RVM$par
and RVM$par2
.convergence = 0
)
or an error:
1
= the iteration limit maxit
has been reached
51
= a warning from the "L-BFGS-B" method; see component message
for further details
52
= an error from the "L-BFGS-B" method; see component message
for further detailsoptim
, or NULL
.fn
and gr
respectively.
This excludes those calls needed to compute the Hessian, if requested, and any calls to fn
to compute a finite-difference
approximation to the gradient.hessian = TRUE
, the Hessian matrix is returned. Its calculation is on the basis of finite differences (output of optim
).se = TRUE
, the standard errors of parameter estimates are returned. Their calculation is based on the Hesse matrix (see above).RVineSeqEst
, RVineStructureSelect
, RVineMatrix
, RVineGrad
,
RVineHessian
# define 5-dimensional R-vine tree structure matrix
Matrix = c(5,2,3,1,4,0,2,3,4,1,0,0,3,4,1,0,0,0,4,1,0,0,0,0,1)
Matrix = matrix(Matrix,5,5)
# define R-vine pair-copula family matrix
family = c(0,1,3,4,4,0,0,3,4,1,0,0,0,4,1,0,0,0,0,3,0,0,0,0,0)
family = matrix(family,5,5)
# define R-vine pair-copula parameter matrix
par = c(0,0.2,0.9,1.5,3.9,0,0,1.1,1.6,0.9,0,0,0,1.9,0.5,
0,0,0,0,4.8,0,0,0,0,0)
par = matrix(par,5,5)
# define second R-vine pair-copula parameter matrix
par2 = matrix(0,5,5)
# define RVineMatrix object
RVM = RVineMatrix(Matrix=Matrix,family=family,par=par,par2=par2,
names=c("V1","V2","V3","V4","V5"))
# simulate a sample of size 300 from the R-vine copula model
simdata = RVineSim(300,RVM)
# compute the MLE
mle = RVineMLE(simdata,RVM,grad=TRUE)
mle$RVM
Run the code above in your browser using DataLab