Learn R Programming

mmpp (version 0.4)

splitMPP: Split MPP Data by Sliding Time Window

Description

This function splits a point process realization into a list of splitted point process realizations with length h.

Usage

splitMPP(mppdata, h = 60 * 60 * 48, ol = NULL, TimeOrigin = TRUE, scaleMarks = FALSE, scaleWindow = TRUE, MarkCenter = NULL, MarkCenterID = NULL)

Arguments

mppdata
marked point process in data.frame composed of "time, mark1, mark2, ...".
h
width of the time window. Default is set to h=60*60*48, which is two days when $time is recorded in second. This is suitable for a special seismic data only.
ol
length of overlap for the sliding window. Default 0.
TimeOrigin
logical. If TRUE, the beginning of the window is assumed to be the origin of time. Default TRUE.
scaleMarks
logical. If TRUE, marks (except time) are normalized to have unit variance in whole time series (not in individual windows). Default FALSE.
scaleWindow
logical. If TRUE, time interval (window.length) is normalized to one.
MarkCenter
vector for specifying the center of the mark. Use when there are relative center point such as the main shock of the earthquake. Default NULL.
MarkCenterID
vector for specifying the elements of center of the mark.

Details

splitMPP splits a point process realization into a list of splitted point process realizations with length h.

Examples

Run this code
##The aftershock data of 26th July 2003 earthquake of M6.2 at the northern Miyagi-Ken Japan.
data(Miyagi20030626)
## time longitude latitude depth magnitude
## split events by 5-hours
sMiyagi <- splitMPP(Miyagi20030626,h=60*60*5,scaleMarks=TRUE)

Run the code above in your browser using DataLab