make_spatial_info.ndd: Build objects related to spatial information, and is exactly...

Description Usage Arguments Details Value

View source: R/make_spatial_info.ndd.r

Description

make_spatial_info builds a tagged list with all the spatial information needed for Data_Fn

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
make_spatial_info.ndd(
  n_x,
  Lon_i,
  Lat_i,
  Extrapolation_List,
  knot_method = "samples",
  Method = "Mesh",
  grid_size_km = 50,
  grid_size_LL = 1,
  fine_scale = FALSE,
  Network_sz_LL = NULL,
  iter.max = 1000,
  randomseed = 1,
  nstart = 100,
  DirPath = paste0(getwd(), "/"),
  Save_Results = FALSE,
  LON_intensity,
  LAT_intensity,
  crs.en,
  crs.ll,
  ...
)

Arguments

n_x

the number of vertices in the SPDE mesh (determines the spatial resolution when Method="Mesh")

Lon_i

Longitude for each sample

Lat_i

Latitude for each sample

Extrapolation_List

the output from Prepare_Extrapolation_Data_Fn

knot_method

whether to determine location of GMRF vertices based on the location of samples knot_method=`samples` or extrapolation-grid cells within the specified strata knot_method='grid'

Method

a character of either "Grid" or "Mesh" where "Grid" is a 2D AR1 process, and "Mesh" is the SPDE method with geometric anisotropy

grid_size_km

the distance between grid cells for the 2D AR1 grid (determines spatial resolution when Method="Grid") when not using Method="Spherical_mesh"

grid_size_LL

the distance between grid cells for the 2D AR1 grid (determines spatial resolution when Method="Grid") when using Method="Spherical_mesh"

fine_scale

a Boolean indicating whether to ignore (fine_scale=FALSE) or account for (fine_scale=TRUE) fine-scale spatial heterogeneity; See details for more informatino

Network_sz_LL

data frame with "parent_s", "child_s", "dist_s", "Lat", "Lon", default=NULL only needed with Method == "Stream_network"

iter.max

Iterations for kmeans clustering to determine knot configuration

randomseed

Set seed for consistent random number generation

nstart

Number of starts for kmeans clustering algorithm

DirPath

Directory path to save results for FishStatsUtils::Calc_Kmeans

Save_Results

TRUE or FALSE to save results FishStatsUtils::Calc_Kmeans

LON_intensity

The longitude of points to define the spatial mesh

LAT_intensity

The latitude of points to define the spatial mesh

crs.en

Character string of the crs for the E-N projection

crs.ll

Character string of the crs for the current lat-lon projections

...

additional arguments passed to INLA::inla.mesh.create

Details

fine_scale=TRUE is a new feature starting in V8.0.0 which triggers two major changes: (1) projecting Gaussian Markov random fields from knots to sampling and extrapolation-grid locations using bilinear interpolation (i.e., piecewise linear smoothing), and (2) including density covariates individually for extrapolation-grid and sampling locations. fine_scale=FALSE is designed to be backwards compatible with earlier versions, although V8.0.0 may also require changes to input naming conventions for covariates to specify the same model and attain the same fit.

LON_intensity and LAT_intensity allow users to specify locations that are used by the k-means algorithm to determine the location of knots, where e.g. users can either hard-code the desired knot locations via these inputs (using n_x greater than this number of locations), or use the extrapolation-grid to ensure that knots are located proportional to that grid.

Value

Tagged list containing objects for running a VAST model

MeshList

A tagged list with inputs related to the SPDE mesh

GridList

A tagged list with inputs related to the 2D AR1 grid

a_xl

A data frame with areas for each knot and each strattum

loc_UTM

A data frame with the converted UTM coordinates for each sample

Kmeans

Output from FishStatsUtils::Calc_Kmeans with knots for a triangulated mesh

knot_i

The knot associated with each sample

Method

The Method input (for archival purposes)

loc_x

The UTM location for each knot


PacificCommunity/ofp-sam-vast-utils documentation built on Nov. 2, 2020, 7:05 p.m.