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

toygroups

Simulated 1D animal group locations and group sizes


Description

This data set serves to teach the concept of modelling species that gather in groups and where the grouping behaviour depends on space.

Usage

data(toygroups)

Format

The data are a list that contains these elements:

groups:

A data.frame of group locations x and size size

df.size:

IGNORE THIS

df.intensity:

A data.frame with Poisson process intensity d.lambda at locations x

df.rate:

A data.frame the locations x and associated rate which parameterized the exponential distribution from which the group sizes were drawn.

Examples

# Load the data

data("toygroups", package = "inlabru")

# The data set is a simulation of animal groups residing in a 1D space. Their
# locations in x-space are sampled from a Cox process with intensity

ggplot(toygroups$df.intensity) +
  geom_line(aes(x = x, y = g.lambda))

# Adding the simulated group locations to this plot we obtain

ggplot(toygroups$df.intensity) +
  geom_line(aes(x = x, y = g.lambda)) +
  geom_point(data = toygroups$groups, aes(x, y = 0), pch = "|")

# Each group has a size mark attached to it.
# These group sizes are sampled from an exponential distribution
# for which the rate parameter depends on the x-coordinate

ggplot(toygroups$groups) +
  geom_point(aes(x = x, y = size))

ggplot(toygroups$df.rate) +
  geom_line(aes(x, rate))

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.