f_mc_kernels: Calculate mixture component kernel matrices.

Description Usage Arguments Value Examples

View source: R/convoSPAT_simulate.R

Description

f_mc_kernels calculates spatially-varying mixture component kernels using generalized linear models for each of the eigenvalues (lam1 and lam2) and the angle of rotation (eta).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
f_mc_kernels(
  y.min = 0,
  y.max = 5,
  x.min = 0,
  x.max = 5,
  N.mc = 3^2,
  lam1.coef = c(-1.3, 0.5, -0.6),
  lam2.coef = c(-1.4, -0.1, 0.2),
  logit.eta.coef = c(0, -0.15, 0.15)
)

Arguments

y.min

Lower bound for the y-coordinate axis.

y.max

Upper bound for the y-coordinate axis.

x.min

Lower bound for the y-coordinate axis.

x.max

Upper bound for the y-coordinate axis.

N.mc

Number of mixture component locations.

lam1.coef

Log-linear regression coefficients for lam1; the coefficients correspond to the intercept, longitude, and latitude.

lam2.coef

Log-linear regression coefficients for lam2; the coefficients correspond to the intercept, longitude, and latitude.

logit.eta.coef

Scaled logit regression coefficients for eta; the coefficients correspond to the intercept, longitude, and latitude.

Value

A list with the following components:

mc.locations

A N.mc x 2 matrix of the mixture component locations.

mc.kernels

A N.mc x 2 x 2 array of kernel matrices corresponding to each of the mixture component locations.

Examples

1
2
3
f_mc_kernels( y.min = 0, y.max = 5, x.min = 0,
x.max = 5, N.mc = 3^2, lam1.coef = c(-1.3, 0.5, -0.6),
lam2.coef = c(-1.4, -0.1, 0.2), logit.eta.coef = c(0, -0.15, 0.15) )

convoSPAT documentation built on Jan. 16, 2021, 5:31 p.m.