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

Poisson2_1D

1-Dimensional NonHomogeneous Poisson example.


Description

Point data and count data, together with intensity function and expected counts for a unimodal nonhomogeneous 1-dimensional Poisson process example.

Usage

data(Poisson2_1D)

Format

The data contain the following R objects:

lambda2_1D:

A function defining the intensity function of a nonhomogeneous Poisson process. Note that this function is only defined on the interval (0,55).

cov2_1D:

A function that gives what we will call a 'habitat suitability' covariate in 1D space.

E_nc2

The expected counts of the gridded data.

pts2

The locations of the observed points (a data frame with one column, named x).

countdata2

A data frame with three columns, containing the count data:

x

The grid cell midpoint.

count

The number of detections in the cell.

exposure

The width of the cell.

Examples

library(ggplot2)
data(Poisson2_1D)
p1 <- ggplot(countdata2) +
  geom_point(data = countdata2, aes(x = x, y = count), col = "blue") +
  ylim(0, max(countdata2$count, E_nc2)) +
  geom_point(
    data = countdata2, aes(x = x), y = 0, shape = "+",
    col = "blue", cex = 4
  ) +
  geom_point(
    data = data.frame(x = countdata2$x, y = E_nc2), aes(x = x),
    y = E_nc2, shape = "_", cex = 5
  ) +
  xlab(expression(bold(s))) +
  ylab("count")
ss <- seq(0, 55, length = 200)
lambda <- lambda2_1D(ss)
p2 <- ggplot() +
  geom_line(
    data = data.frame(x = ss, y = lambda),
    aes(x = x, y = y), col = "blue"
  ) +
  ylim(0, max(lambda)) +
  geom_point(data = pts2, aes(x = x), y = 0.2, shape = "|", cex = 4) +
  xlab(expression(bold(s))) +
  ylab(expression(lambda(bold(s))))
multiplot(p1, p2, cols = 1)

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.