stpp: Convert data to class 'stpp'

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

View source: R/stpp.R

Description

stpp creates a space-time point pattern of class “stpp” for use by the package stppResid.

Usage

1
stpp(x, y, t, stw)

Arguments

x

A vector of x coordinates.

y

A vector of y coordinates.

t

A vector of t coordinates.

stw

An object of class “stwin”.

Details

x, y, and t represent the coordinates of all observed points in the space-time window described by stw. If any points fall outside of the window, a warning message is returned, and those points are removed from the point pattern. All inclusive points are then ordered in ascending order according to the t coordinates.

If no space-time window is specified, the default is a unit cube.

Value

Outputs an object of class "stpp", which is a list of

x

A vector of x coordinates.

y

A vector of y coordinates.

t

A vector of t coordinates.

stw

An object of class "stwin".

Author(s)

Robert Clements

See Also

stwin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#==> create a stpp object <===#
x <- rnorm(30, mean = 10, sd = 1)
y <- rnorm(30, mean = 100, sd = 10)
t <- runif(30, 0, 100)
stw <- stwin(xcoord = c(0, 20), ycoord = c(50, 150), tcoord = c(0, 100))
X <- stpp(x, y, t, stw = stw)

#===> create a stpp object from redbanana data <===#
data(redbanana)
attach(redbanana)
xcoord <- c(min(longitude)-.01, max(longitude)+.01)
ycoord <- c(min(latitude)-.01, max(latitude)+.01)
tcoord <- c(0, max(birth)+.01)
stw <- stwin(xcoord, ycoord, tcoord)
X <- stpp(longitude, latitude, birth, stw)

stppResid documentation built on May 29, 2017, 3:48 p.m.

Related to stpp in stppResid...