to_int_surf: Convert a normal mixture to an intensity surface

Description Usage Arguments Value Author(s) See Also Examples

View source: R/normmix.R

Description

This function converts a normmix object into an intensity_surface object. It can also be used to change the parameters lambda (average number of points over the window) or win (window of observation) of an intensity_surface object.

For examples see

http://faculty.missouri.edu/~micheasa/sppmix/sppmix_all_examples.html#to_int_surf

If the class of mix is normmix, lambda and win are used to convert mix into an intensity surface class. If the class of mix is intensity_surface already, lambda and win are used to change the original settings for these parameters.

Usage

1
to_int_surf(mix, lambda = NULL, win = NULL, return_normmix = FALSE)

Arguments

mix

Object of class normmix or intensity_surface.

lambda

Optional parameter treated as the average number of points over the window.

win

Optional parameter of class owin, defining the window of observation.

return_normmix

Logical variable requesting to return a normal mixture (discard lambda and win).

Value

Object of class intensity_surface.

Author(s)

Yuchen Wang

See Also

normmix, rnormmix, square

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
truemix <- normmix(ps=c(.4, .2,.4), mus=list(c(0.3, 0.3), c(.5,.5),c(0.7, 0.7)),
 sigmas = list(.02*diag(2), .05*diag(2),.01*diag(2)))
intsurf=to_int_surf(truemix, lambda = 100, win = spatstat::square(1))
#plot the true mixture
plot(intsurf,main = "True Poisson intensity surface (mixture of normal components)")
# using the demo_mix normmix object
summary(demo_mix)
demo_surf1=to_int_surf(demo_mix, lambda = 100, win = spatstat::square(1))
plot(demo_surf1)
# using an intensity_surface object
summary(demo_intsurf)
demo_surf2=to_int_surf(demo_intsurf, win = spatstat::square(2))
summary(demo_surf2)
plot(demo_surf2)
demo_surf3=to_int_surf(demo_intsurf, lambda = 50)
plot(demo_surf3)

sppmix documentation built on Jan. 13, 2021, 10:04 p.m.