profile.etasclass: profile method for etasclass objects (ETAS model) (To be...

View source: R/profile.etasclass.R

profile.etasclassR Documentation

profile method for etasclass objects (ETAS model) (To be checked)

Description

profile method for etasclass objects (ETAS model).

Usage

## S3 method for class 'etasclass'
profile(fitted,iprofile		=1,
				 nprofile	=7,
				 kprofile	=3,
				 profile.approx	=FALSE,...)

Arguments

fitted

An object of the class etasclass

.

iprofile

An integer in the range 1-7. Profile likelihood will be computed with respect to the parameter of index iprofile. The order of parametrs is: mu, k0, c, p, a, gamma, d, q. In this version 2.0.0 profile only for etas parameters, not for covariates parameters. It will added future versions

nprofile

Number of values of params[iprofile] for which profile likelihood must be computed. Default value= 7.

kprofile

Maximum absolute standardized value for params[iprofile]. Profile likelihood will be computed in the standardized range [-kprofile, kprofile]. Default value= 3.

profile.approx

if TRUE, then a conditional-likelihood approach is used as a first value for each maximization step in profile likelihood computation. Default value= FALSE.

...

other arguments.

Details

Profile likelihood for the iprofile-th parameter of the ETAS model for earthquake seismicity, estimated with etasclass; the order of parameters is: mu,k0,c,p,gamma,d,q and betacov.

A plot method is defined for profile.etasclass objects. A number of grid points nprofile of 7 (the default) usually is enough to have a good interpolation of the profile likelihood. The profile is computed using the final estimation of the background seismicity used to obtain the object etas of class etasclass and regardless to the method used. The computing time (for each of the nprofile values) is generally less than a single execution of etasclass without clustering, because only ML estimation is performed. Parameters not estimated in etas (with params.ind[i]=FALSE) will remain fixed do the value params.fix[i].

To obtain profiles for different parameters, run profile.etasclass with different values of iprofile.

Value

Returns a list:

params.vec

vector of values of the parameter iprofile used to evaluate the profile likelihood.

logl.vec

vector of likelihoods corresponding to the values of params.vec

plot method is defined to represent profile likelihood (in scale -2log(LR)), using a spline interpolation through grid points, with superimposition of approximate confidence intervals.

Note

A odd number of grid points nprofile is adviced, so that the central point is the unconstrained ML estimate for the profiled parameter, and the interpolation of the profile likelihood will have a better quality.

Author(s)

Marcello Chiodi, Giada Adelfio

See Also

eqcat, etasclass, plot.profile.etasclass

Examples

## Not run: ##
data("italycatalog")
# load a sample catalog of italian seismicity  

   etas.flp<-etasclass(italycatalog,  
   magn.threshold = 3.0,  magn.threshold.back = 3.5,
   k0 = 0.005, c = 0.005, p = 1.01, gamma = 0.6, q = 1.52, d = 1.1,
   params.ind = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),
   formula1 = "time ~  magnitude- 1", declustering = TRUE, 
   thinning = FALSE, flp = TRUE, ndeclust = 15,
   onlytime = FALSE, is.backconstant = FALSE,
   description = "etas flp",sectoday = TRUE,
   usenlm = TRUE, epsmax = 0.001)
    # execution of etasclass for events with minimum magnitude of 3.0. 
    # The events with magnitude at least 3.5 are used to build a first approximation
    # for the background intensity function
    # (magn.threshold.back=3.5)
    
## compute profile likelihood for the first parameter (mu)
 system.time( prof.flp <- profile(etas.flp, nprofile = 7, iprofile = 1))
 plot(prof.flp)
#### output:
Asymptotic  confidence  intervals: 
  Coverage Lower Upper
1     0.90 0.335 0.376
2     0.95 0.334 0.378
3     0.99 0.329 0.385


## End(Not run)

etasFLP documentation built on Sept. 14, 2023, 5:06 p.m.