ComplPos.fun: Changes the format of a vector of the occurrence times in a...

Description Usage Arguments Details Value See Also Examples

View source: R/ComplPos.fun.R

Description

It changes the format ofthe vector of the occurrence points in a point process. It builds a vector of length T, the length of the observation period, which takes value 0 at the non occurrence times and the position value, or 1, at the occurence times.

Usage

1
ComplPos.fun(pos, T, type='Pos')

Arguments

pos

Numeric vector. Occurrence times

T

Integer. Length of the observation period

type

Character string, 'Pos' or 'Bin'. Type of the new format

Details

This function changes the format of the occurrence points in a point process. The new format is useful when several point processes, in the same observation period, must be specfied; for example, in function NHJ.fun or NHD.fun, where the occurrence times of different point processes must be introduced as a matrix. Since the number of occurrences in each process can be different, in the new format, occurrences in each process are specified as a vector of length T, which takes value 0 at non occurrence times and the time position (if type='Pos') or 1 (if type='Bin') at the occurrence times.

Value

Npos

Numeric vector of lenght T containing the occurrence times in the new format.

See Also

NHD.fun, NHF.fun, NHK.fun, NHJ.fun

Examples

1
2
pos<-c(4,15,18,34,36,67,98)
Npos<-ComplPos.fun(pos, T=100)

IndTestPP documentation built on May 29, 2017, 5:19 p.m.