| seMPP.negloglik {QRMlib} | R Documentation |
evaluates negative log-likelihood of a marked self-exciting point process model; this will be objective function massed to nlminb() or optim().
seMPP.negloglik(theta, PP, case, markdens)
theta |
vector of parameters of self-exciting model |
PP |
point-process data |
case |
a numerical variable coding whether Hawkes or ETAS forms are used and whether marks may have an influence on future points |
markdens |
name of density for marks; currently must be "GPD" |
value of log-likelihood
documentation by Scott Ulman for R-language distribution
## Not run:
#Example of using seMPP.negloglik as objective function passed
#to optimizer function
fit.seMPP <- function(PP,markdens="GPD",model="Hawkes",
mark.influence=TRUE,predictable=FALSE,std.errs=FALSE)
{
if (class(PP) != "MPP") stop("Not marked point process data");
marks <- PP$marks;
groundmod <- fit.sePP(PP,model,mark.influence=TRUE,std.errs=FALSE);
#lines removed here...
if(predicatable)
{
theta <- c(par.ests,0);
fit <- nlminb(start=theta, objective=seMPP.negloglik,
PP=PP,case=case, markdens=markdens);
#Lines removed here ...
}
}
## End(Not run)