markedPointProcess: Marked Point Process

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Creates a MarkedPointProcess object from data frame(s).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## S4 method for signature 'data.frame,ContinuousProcess'
markedPointProcess(pointData,
continuousData, markVar = 'markType', coarsen = NULL, ...)

## S4 method for signature 'data.frame,data.frame'
markedPointProcess(pointData, continuousData, ...,
markVar = 'markType', coarsen = NULL)

## S4 method for signature 'data.frame,vector'
markedPointProcess(pointData, continuousData,
positionVar = 'time', idVar = 'id', markVar = 'markType', ...)

## S4 method for signature 'vector,data.frame'
markedPointProcess(pointData, continuousData,
positionVar = 'time', idVar = 'id', markVar = 'markType', ...)

## S4 method for signature 'vector,vector'
markedPointProcess(pointData, continuousData, ...)


## S4 method for signature 'data.frame'
markedPointProcess(pointData, positionVar = 'time',
idVar = 'id', markVar = 'markType', ...)

## S4 method for signature 'MarkedPointProcess'
markedPointProcess(pointData, ...)

Arguments

pointData

a data.frame containing the point process data. It must have a numeric column named positionVar and optional factor columns named markVar and idVar. Additional columns are allowed and stored as further mark values for each point.

continuousData

a ContinuousProces object or a data frame containing the continuous process data. Alternatively, a vector giving an observation window and grid for each unit.

positionVar

a character specifying the name of the variable holding the x-coordinates for the observations. Default value 'time'.

idVar

a character specifying the name of the identification variable for the units. Default value 'id'.

markVar

a character specifying the name of the mark variable. Default value 'markType'.

coarsen

a character or NULL. Either 'left' or 'right' for coarsing the event points to the observation grid, or NULL (the default) for no coarsing.

...

further arguments passed to continuousProcess.

Details

If the data frame pointData lacks either of the markVar or idVar columns they are automatically generated. If markVar is missing it is assumed that there is only one type of marks. If idVar is missing it is assumed that there is only one unit.

If coarsen is not NULL the event points are coarsed to the observation grid of the continuous process. Otherwise the observation grid will be enlarged to include the event points and continuous process data will be interpolated.

The constructor with signature ("data.frame", "data.frame") is a wrapper for

markedPointProcess(pointData, continuousProcess(continuousData, ...), markVar = 'markType', ...).

Value

An object of class MarkedPointProcess.

Author(s)

Niels Richard Hansen, Niels.R.Hansen@math.ku.dk

See Also

MarkedPointProcess, ContinuousProcess, continuousProcess.

Examples

1
2
3
4
5
MPP <- data.frame(time = cumsum(rexp(18, 2)))
markedPointProcess(MPP)

CP <- data.frame(id = rep("A",10), time = seq(0.1, 10, 0.1), value = rnorm(100))
markedPointProcess(MPP, CP)

ppstat documentation built on May 2, 2019, 5:26 p.m.