# DepMarkedNHPP.fun: Generates trajectories of dependent point processes using a... In IndTestPP: Tests of Independence Between Point Processes in Time

## Description

This function generates d dependent (homogeneous or nonhomogeneous) point processes using a marked PP, where the marks are generated by a Markov chain process defined by a given transition matrix.

## Usage

 `1` ```DepMarkedNHPP.fun(lambdaTot, MarkovM, inival = 1, fixed.seed=NULL) ```

## Arguments

 `lambdaTot` Numeric vector. Intensity values of the underlying PP used to generate the dependent processes. `MarkovM` Matrix. Trasition probabilities of the d-state Markov chain used to generate the marks of the PP. `inival` Optional. Initial mark value used to generate the series of marks. `fixed.seed` Optional. An integer or NULL. Value used to set the seed in random generation processes; if it is NULL, a random seed is used.

## Details

Points of the marked PP are generated in continuous time, using the following procedure: First, a trajectory of the underlying PP, which represents the global process of the occurrences in all the processes, is generated. Then, the mark series is generated using a d-state Markov chain. The mark series takes values in 1,2,...,d and determines in which of the d processes the point occurs

A transition matrix P = (p_{ij}) with equal rows leads to d independent point processes, and the more similar the rows of P, the less dependent the resulting processes. Some dependence measures between the generated processes, such as the spectral gap, are suggested in Abaurrea et al. (2014).

It is noteworthy, that the processes defined by the marks are not Poisson, since the generated marks are dependent observations, see Isham (1980).

## Value

A list with elements

 `posNH ` Numeric vector of the occurrences times of the underlying PP generated. `mark ` Vector of the generated marks, which indicate the process where the point occurs. `lambdaTot ` Input argument. `MarkovM ` Input argument.

## References

Abaurrea, J. Asin, J. and Cebrian, A.C. (2014). A Bootstrap Test of Independence Between Three Temporal Nonhomogeneous Poisson Processes and its Application to Heat Wave Modeling. Environmental and Ecological Statistics, 22(1), 127-144.

Isham, V. (1980). Dependent thinning of point processes. J. Appl. Probab., 17(4), 987-95.

`DepNHPPqueue.fun`, `DepNHNeyScot.fun`, `DepNHCPSP.fun`, `IndNHPP.fun`, `SpecGap.fun`
 ```1 2 3 4 5 6 7``` ```# Generation of three dependent point processes using a marked PP set.seed(123) lambdaTot<-runif(1000)/10 aux<-DepMarkedNHPP.fun(lambdaTot=lambdaTot, MarkovM=cbind(c(0.3,0.1,0.6), c(0.1, 0.6, 0.3), c(0.6, 0.3,0.1)),fixed.seed=123) print(cbind(aux\$posNH, aux\$mark)) ```