Geostat_Sim: Simulate data

View source: R/deprecated.R

Geostat_SimR Documentation

Simulate data

Description

Geostat_Sim simulates data for use when testing VAST

Usage

Geostat_Sim(
  Sim_Settings,
  Extrapolation_List,
  Data_Geostat = NULL,
  MakePlot = FALSE,
  DateFile = paste0(getwd(), "/"),
  standardize_fields = FALSE
)

Arguments

Sim_Settings

an optional tagged list for specifying input parameters (see function code to determine settings)

Extrapolation_List

the output from make_extrapolation_info

Data_Geostat

A data frame with column headers c('Lon','Lat','Year','Vessel','AreaSwept_km2') containing sample design to mimic

standardize_fields

Boolean, whether to ensure that random fields have sample mean and standard deviation equal to their inputted values

Value

Return Tagged list of output

Data_Geostat

Simulated data for analysis

B_tl

True biomass for each year and stratum

Examples

## Do not run (will be slow, due to simulating fine-scale spatial variation for many sites):
##
## # Prepare inputs
## Database = FishData::download_catch_rates( survey="Eastern_Bering_Sea", species_set="Gadus chalcogrammus", error_tol=0.01 )
## Data_Geostat = data.frame("Lat"=Database[,'Lat'], "Lon"=Database[,'Long'], "Year"=Database[,'Year'], "Vessel"="missing", "AreaSwept_km2"=1 )
## Extrapolation_List = FishStatsUtils::Prepare_Extrapolation_Data_Fn( Region="Eastern_Bering_Sea", strata.limits=data.frame( 'STRATA'="All_areas") )
##
## # Use function
## SimList = FishStatsUtils::Geostat_Sim(Sim_Settings=list(), Extrapolation_List, Data_Geostat=Data_Geostat )
## Data_Sim = SimList$Data_Geostat

James-Thorson/FishStatsUtils documentation built on Feb. 6, 2024, 4:26 a.m.