prepare_data: Prepare the 'data' argument for the 'spatq' model

View source: R/prepare_data.R

prepare_dataR Documentation

Prepare the data argument for the spatq model

Description

Create a list of all data elements required to fit a spatq model with names etc.

Usage

prepare_data(
  catch_df,
  index_df,
  mesh,
  fem,
  obs_lik = 0L,
  X_contr = contr.helmert
)

Arguments

catch_df

A data frame with catch observations, as read in by read_catch

index_df

A data frame with coordinates for index calculation, as generated by create_index_df

mesh

A FEM mesh for the domain

fem

The sparse FEM matrices from the mesh as generated by generate_fem

obs_lik

Observation likelihood. Current options are 0: Poisson-link log-normal and 1: Tweedie

X_contr

Contrasts to use for fixed effect design matrix

Value

A list with the data values for a spatq model

Author(s)

John Best


jkbest2/spatq documentation built on Sept. 22, 2022, 3:22 a.m.