Description Usage Arguments Details Value See Also Examples
View source: R/emplambdaD.fun.r
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.
1 2 |
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 |
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. |
The intervals can be specified either by nint or lint; only one of the arguments must be provided.
A list with elements
emplambda |
Vector of the empirical rates. |
lint |
Input argument. |
nint |
Input argument. |
emplambda.fun
, fitPP.fun
,
POTevents.fun
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.