normmix: Two-dimensional mixture with normal components.

Description Usage Arguments Value See Also Examples

Description

Constructor function of normmix class. Create a mixture in two-dimensional with bivariate normal components. If additional parameters lambda and window are set, it will create an intensity surface.

Usage

1
2
3
4
5
6
7
normmix(ps, mus, sigmas, lambda = NULL, win = NULL, estimated = FALSE)

## S3 method for class 'normmix'
summary(object, ...)

## S3 method for class 'intensity_surface'
summary(object, ...)

Arguments

ps

Vector of component probabilities.

mus

A list where every element is a vector of length 2, defining the center of each component.

sigmas

A list where every element is a 2 by 2 covariance matrix, defining the covariance for each component.

lambda

Optional parameter of average number of points. If set with window, the returned object will be an intensity surface.

win

Optional parameter of window. Must be set with intensity value to create an intensity surface.

estimated

Whether it's an estimated mixture. By default it's set to FALSE. When using an estimated mixture, it should be set to TRUE.

object

An object of class normmix

...

Currently omitted.

Value

An object of class "normmix" containing the following components:

m

Number of components.

ps

Vector of component probabilities.

mus

List of mean vectors of components.

sigmas

List of covariance matrix of components.

intensity

Optional intensity value if lambda is provided when calling normmix.

window

Optional window object of class owin.

estimated

Whether the normal mixture is estimated.

See Also

rnormmix for generating random mixture.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
mix1 <- normmix(ps = c(.3, .7),
                mus = list(c(0.2, 0.2), c(.8, .8)),
                sigmas = list(.01*diag(2), .01*diag(2)))
mix1


intsurf1 <- normmix(ps = c(.3, .7),
                    mus = list(c(0.2, 0.2), c(.8, .8)),
                    sigmas = list(.01*diag(2), .01*diag(2)),
                    lambda = 100,
                    win = square(1))
intsurf1

wangyuchen/sppmix documentation built on May 4, 2019, 12:58 a.m.