# IPPPnthpointdens: Probability Density of Events in an Inhomogeneous Poisson... In IPPP: Inhomogeneous Poisson Point Processes

## Description

Determines values of the probability density function of the n-th point of an inhomogeneous Poisson point process (IPPP), given that a fixed number of events occur. The IPPP is described by a rate function r.

## Usage

 `1` ```IPPPnthpointdens(x, n, samplesize, xrate, yrate) ```

## Arguments

 `x` Vector of real numbers where the value of the probability density is determined `n` Natural number smaller than samplesize. Determines the event for which the probability density is determined. 1=first event from the left, i=i-th event from the left. `samplesize` Natural number. The overall number of events occurring `xrate` Vector of (strictly increasing) real numbers `yrate` Vector of positive real numbers of the same length as xrate. The vectors xrate and yrate form the rate function r in the sense that r=approxfun(xrate,yrate)

## Details

Below min(xrate) and above max(xrate), the rate function r is assumed to have the value zero.

## Value

A list containing two entries:

 ` x ` A duplicate of the input of the same name ` densval ` A vector consisting of the values of the probability density, evaluated at x

Niklas Hohmann

## References

Hohmann, Niklas. "Conditional Densities and Simulations of Inhomogeneous Poisson Point Processes: The R package "IPPP"" arXiv 2019. <arXiv:1901.10754>

`IPPPconddens` for the probability density of the n-th event above/below the location of some given event.
`vignette("IPPP")` for an overview of the features of the IPPP package and some background.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15``` ```sx=c(1,2,3,4,5) sy=c(0,1,1,3,0) sm=c(1,0,1,0,-1) xrate=seq(1,5,length.out=100) yrate=splinefunH(sx,sy,sm)(xrate) #plot rate function plot(xrate,yrate,type='l',xlim=c(0.5,5.5), main='Rate Function') x=seq(0,6,length.out = 1000) #point where the pdf is determined n=1 #get the pdf of the first point from the left ... samplesize=5 #... out of a sample of five ll=IPPPnthpointdens(x,n,samplesize,xrate,yrate) plot(ll\$x,ll\$densval,type='l') #plot the resulting pdf legend('topleft',legend=paste('pdf of point no.',as.character(n), 'out of ',as.character(samplesize)), 'points' ,lty=1) ```