dnormmix: Calculate density of normal mixture.

Description Usage Arguments Value Examples

Description

When a normmix object is given, this function estimates density values within the domain. When a intensity_surface is given, it multiplies the estimated density values with intensity and returns the estimated intensity.

Usage

1
2
dnormmix(mix, xlim = as.numeric(c(0, 1)), ylim = as.numeric(c(0, 1)),
  L = 128L, truncate = TRUE)

Arguments

mix

An object of class normmix or intensity_surface. When an intensity surface is given, it estimates the intensity instead of density within the domain.

xlim, ylim

The range within which the density or intensity is calculated.

L

Length of grid on each axis. The density is calculated on a L * L grid.

truncate

Whether to truncate the density to be within the domain.

Value

An matrix with the first two columns the grid coordinates and the third column the density (intensity) value.

Examples

1
2
est_density <- dnormmix(demo_mix)
est_density <- dnormmix(demo_intsurf)

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