get.pi.typed: Optimized version of 'get.pi' for typed data.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/spatialfuncs.r

Description

Version of the get.pi function that is optimized for statically typed data. That is data where we are interested in the probability of points within some distance of points of typeA are of typeB.

Usage

1
2
3
4
5
6
7
8
get.pi.typed(
  posmat,
  typeA = -1,
  typeB = -1,
  r = 1,
  r.low = rep(0, length(r)),
  data.frame = TRUE
)

Arguments

posmat

a matrix with columns type, x and y

typeA

the "from" type that we are interested in, -1 is wildcard

typeB

the "to" type that we are interested i, -1 is wildcard

r

the series of spatial distances wer are interested in

r.low

the low end of each range....0 by default

data.frame

logical indicating whether to return results as a data frame (default = TRUE)

Value

pi values for all the distances we looked at

Author(s)

Justin Lessler and Henrik Salje

See Also

Other get.pi: get.pi.bootstrap(), get.pi.ci(), get.pi.permute(), get.pi.typed.bootstrap(), get.pi.typed.permute(), get.pi()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(DengueSimR02)

r.max<-seq(20,1000,20)
r.min<-seq(0,980,20)

#Lets see if there's a difference in spatial dependence by time case occurs
type<-2-(DengueSimR02[,"time"]<120)
tmp<-cbind(DengueSimR02,type=type)

typed.pi<-get.pi.typed(tmp,typeA=1,typeB=2,r=r.max,r.low=r.min)

IDSpatialStats documentation built on Aug. 9, 2021, 9:08 a.m.