Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cprod

Cross product of integration points


Description

Calculates the cross product of integration points in different dimensions and multiplies their weights accordingly. If the object defining points in a particular dimension has no weights attached to it all weights are assumend to be 1.

Usage

cprod(...)

Arguments

...

data.frame or SpatialPointsDataFrame objects, each one usually obtained by a call to the ipoints function.

Value

A data.frame or SpatialPointsDataFrame of multidimensional integration points and their weights

Author(s)

Fabian E. Bachl bachlfab@gmail.com

Examples

# ipoints needs INLA
if (bru_safe_inla()) {
  # Create integration points in dimension 'myDim' and 'myDiscreteDim'
  ips1 <- ipoints(rbind(c(0, 3), c(3, 8)), 17, name = "myDim")
  ips2 <- ipoints(domain = c(1, 2, 4), name = "myDiscreteDim")

  # Calculate the cross product
  ips <- cprod(ips1, ips2)

  # Plot the integration points
  plot(ips$myDim, ips$myDiscreteDim, cex = 10 * ips$weight)
}

inlabru

Bayesian Latent Gaussian Modelling using INLA and Extensions

v2.3.1
GPL (>= 2)
Authors
Finn Lindgren [aut, cre, cph] (<https://orcid.org/0000-0002-5833-2011>, Finn Lindgren continued development of the main code), Fabian E. Bachl [aut, cph] (Fabian Bachl wrote the main code), David L. Borchers [ctb, dtc, cph] (David Borchers wrote code for Gorilla data import and sampling, multiplot tool), Daniel Simpson [ctb, cph] (Daniel Simpson wrote the basic LGCP sampling method), Lindesay Scott-Howard [ctb, dtc, cph] (Lindesay Scott-Howard provided MRSea data import code), Seaton Andy [ctb] (Andy Seaton provided testing and bugfixes)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.