# emplambdaD.fun: Empirical occurrence rates of a NHPP on disjoint intervals In NHPoisson: Modelling and Validation of Non Homogeneous Poisson Processes

## Description

This function calculates the empirical occurrence rates of a point process using disjoint intervals. The rate is assigned to the mean point of the interval. A plot of the empirical rate over time can be performed optionally.

## Usage

 1 2 emplambdaD.fun(posE, t, lint=NULL, nint = NULL, 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 Optional (alternative argument to nint). Length of the intervals used to calculate the rates. nint Optional (alternative argument to lint). Number of intervals (of equal length) used to to calculate the rates. It is an alternative way to lint for identifying the intervals. 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 POTevents.fun. 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.

## Details

The intervals can be specified either by nint or lint; only one of the arguments must be provided.

## Value

A list with elements

 emplambda  Vector of the empirical rates. lint  Input argument. nint  Input argument.

## See Also

emplambda.fun, fitPP.fun, POTevents.fun

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 data(BarTxTn) BarEv<-POTevents.fun(T=BarTxTn$Tx,thres=318, date=cbind(BarTxTn$ano,BarTxTn$mes,BarTxTn$dia)) # empirical rate based on disjoint intervals using nint to specify the intervals emplambdaDB<-emplambdaD.fun(posE=BarEv$Px,inddat=BarEv$inddat, t=c(1:8415), nint=55) # empirical rate based on disjoint intervals using lint to specify the intervals emplambdaDB<-emplambdaD.fun(posE=BarEv$Px,inddat=BarEv$inddat, t=c(1:8415), lint=153) 

NHPoisson documentation built on Feb. 19, 2020, 5:07 p.m.