generate_projection: Generate a projection matrix

View source: R/inla_spde.R

generate_projectionR Documentation

Generate a projection matrix

Description

Generate a projection matrix to locations in data_df, possible zeroing out some observations. Also group by year for a spatiotemporal effect.

Usage

generate_projection(
  mesh,
  data_df,
  vessel_idx = NULL,
  group = NULL,
  zero = FALSE
)

Arguments

mesh

INLA mesh to project

data_df

Data frame with s1 and s2 columns as coordinates to project to

vessel_idx

Vessel index to project to; others receive zero weight and are dropped

group

Year of observation for spatiotemporal effect

zero

Is this an empty projection matrix? (May be useful if e.g. the random effects parameters associated with it are map'd to zeros.)

Value

A sparse projection matrix

Author(s)

John Best


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