emplambda.fun {NHPoisson} | R Documentation |
Empirical occurrence rates of a NHPP on overlapping intervals
Description
This function calculates the empirical occurrence rates of a point process on overlapping intervals. The empirical rate centered in each time of the observation period is calculated using intervals of a given length. A plot of the empirical rate over time can be performed optionally.
Usage
emplambda.fun(posE, t, lint, plotEmp = TRUE, inddat = NULL, tit ="",
scax = NULL, scay = NULL)
Arguments
posE |
Numeric vector of the position of the occurrence points of the NHPP (or any point process in time). |
t |
Time index of the observation period. The simplest option is 1,...,n with n the length of the period. |
lint |
Length of the intervals used to calculate the rates. |
plotEmp |
Logical flag. If it is TRUE, a plot of the empirical rate is carried out. |
inddat |
Optional. Index vector equal to 1 for the observations used in the estimation process
By default, all the observations are considered, see |
tit |
Character string. A title for the plot. |
scax |
Optional. A two element vector indicating the x-scale for the plot. |
scay |
Optional. A two element vector indicating the y-scale for the plot. |
Value
A list with elements
emplambda |
Vector of the empirical rates. |
lint |
Input argument. |
See Also
emplambdaD.fun
, fitPP.fun
, POTevents.fun
Examples
data(BarTxTn)
BarEv<-POTevents.fun(T=BarTxTn$Tx,thres=318,
date=cbind(BarTxTn$ano,BarTxTn$mes,BarTxTn$dia))
# empirical rate based on overlapping intervals
emplambdaB<-emplambda.fun(posE=BarEv$Px,inddat=BarEv$inddat, t=c(1:8415),
lint=153, tit="Barcelona")