pdhessmin: Minimization with modified Newton-Raphson and positive...

Description Usage Arguments Details Value Examples

Description

pdhessmin: Minimization with modified Newton-Raphson and positive definite Hessian

pdhessminb: Minimization with modified Newton-Raphson and positive definite Hessian, with some parameters fixed (at bounds).

Usage

1
2
pdhessmin(param,objfn,dstruct,LB,UB,mxiter=30,eps=1.e-6,bdd=5,iprint=F)
pdhessminb(param,objfn,ifixed,dstruct,LB,UB,mxiter=30,eps=1.e-6,bdd=5,iprint=F)

Arguments

param

starting point for minimization of function objfn()

objfn

objective function of form objfn(param,dstruct,iprint=F); use iprint=T to print out extra information for debugging your function. objfn returns a list with fnval=functionvalue, grad=gradient, hess=hessian; that is, objfn computes the first and second order derivatives of objfn().

dstruct

data structure with data sets and other variables/controls to be passed and used by objfn()

ifixed

logical vector of same length as param, ifixed[i]=TRUE iff param[i] is fixed at the given value

LB

lower bound of components of param, usually of length(param), could also be a scalar for a common lower bound

UB

upper bound of components of param, usually of length(param), could also be a scalar for a common upper bound

mxiter

maximum number of Newton-Raphson iterations

eps

tolerance for Newton-Raphson iterations, stop when two consecutive iterations with eps in absolute value

bdd

bound on difference of 2 consecutive iterations, default 5

iprint

print flag for intermediate output for each iteration of the Newton-Raphson method

Details

The algorithm is due to P Krupskii.

Value

parmin

parameter value at point of minimum

fnval

function value at the minimum

invh

inverse Hessian at the minimum, estmated covariance matrix at MLE if objfn is negative log-likelihood

iconv

1 for convergence, 0 for not

iposdef

1 for positive definite Hessian at last iteration, 0 for not

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(euro07gf)
udat=euro07gf$uscore
n=nrow(udat)
d=ncol(udat)
np=2*d
stfrk2=rep(3,np);
LB.frk2=rep(-60,np);  UB.frk2=rep(60,np);
gl=gausslegendre(15)
dstructfrk=list(copname="frank",data=udat,quad=gl,repar=0);
ifixed=rep(FALSE,np);
ml= pdhessminb(stfrk2,f90cop2nllk,ifixed=ifixed,dstruct=dstructfrk,
  LB=LB.frk2,UB=UB.frk2,iprint=TRUE,eps=1.e-4);

YafeiXu/CopulaModel documentation built on May 9, 2019, 11:07 p.m.