Workflow steps

Casting boundaries

Create a spatial boundaries object for your model

spm_as_boundary()

Create a sspm_boundary object

sspm_boundary-class

sspm boundary structure

Discretizing boundaries

Discretize your spatial boundaries object into patches

spm_discretize spm_discretize,sspm_boundary,missing,ANY-method spm_discretize,sspm_boundary,ANY,missing-method spm_discretize,sspm_boundary,character,ANY-method spm_discretize,sspm_boundary,function,ANY-method spm_discretize,sspm_boundary,discretization_method,ANY-method

Discretize a sspm model object

sspm_discrete_boundary-class

sspm discrete boundary structure

tesselate_voronoi()

Perform voronoi tesselation

triangulate_delaunay()

Perform delaunay triangulation

spm_methods()

Get the list of available discretization methods

as_discretization_method as_discretization_method,character,ANY-method as_discretization_method,missing,function-method

Cast into a discretization_method object

discretization_method-class

sspm discretization method class

Casting datasets

Create dataset objects for your raw variables

spm_as_dataset()

Create a sspm_dataset dataset structure

sspm_dataset-class

sspm dataset structure

Smoothing biomass

Smooth the raw variables using gams

spm_smooth()

Smooth a variable in a sspm dataset

spm_smooth_methods()

Get the list of available smoothing methods

smooth_time() smooth_space() smooth_space_time() smooth_lag()

sspm Smoothing functions

Aggregating catch

Aggregate the catch data according to discretized boundaries

spm_aggregate_catch()

Update biomass value from catch adta

spm_aggregate()

Aggregate a dataset or fit data variable based on a boundary

Assembling and modifiying SSPM objects

Assemble the model object and prepare it for fitting

sspm()

Create a sspm model object

sspm-class

sspm model class

spm_split()

Split data in test and train sets

spm_lag()

Create lagged columns in a sspm smoothed data slot

Fitting the surplus production model

Fit the model

spm()

Fit an SPM model

sspm_fit-class

sspm fit

sspm_formula-class

sspm formula object

summary(<sspm_fit>)

Summarises sspm_fit objects

Predict and plot

Predict and plot results

predict(<sspm_fit>) predict(<sspm_dataset>)

Predict with a SPM model

predict_intervals()

GAM confidence and prediction intervals

plot(<sspm_boundary>,<missing>) plot(<sspm_dataset>,<missing>) plot(<sspm_fit>,<missing>)

Plot sspm objects

Datasets

Datasets used in the vignette

borealis_simulated

Simulated biomass data

catch_simulated

Simulated catch data

predator_simulated

Simulated predator data

sfa_boundaries

SFA boundaries data

Accessors

Accessors method for various objects

spm_boundaries(<sspm_boundary>) `spm_boundaries<-`(<sspm_boundary>) spm_discret_method() `spm_discret_method<-`() spm_patches() `spm_patches<-`() spm_points() `spm_points<-`() spm_boundary() `spm_boundary<-`() spm_boundary_area() `spm_boundary_area<-`() spm_patches_area() `spm_patches_area<-`()

Accessing OR replacing sspm_boundary model elements

spm_data() `spm_data<-`() spm_name(<sspm_dataset>) `spm_name<-`(<sspm_dataset>) spm_unique_ID(<sspm_dataset>) `spm_unique_ID<-`(<sspm_dataset>) spm_coords_col() `spm_coords_col<-`() spm_time(<sspm_dataset>) `spm_time<-`(<sspm_dataset>) spm_biomass_vars() `spm_biomass_vars<-`() spm_density_vars() `spm_density_vars<-`() spm_formulas() `spm_formulas<-`() spm_smoothed_data(<sspm_dataset>) `spm_smoothed_data<-`(<sspm_dataset>) spm_smoothed_fit() `spm_smoothed_fit<-`() spm_smoothed_vars() `spm_smoothed_vars<-`() is_mapped() `is_mapped<-`() spm_boundaries(<sspm_dataset>) `spm_boundaries<-`(<sspm_dataset>)

Accessing OR replacing sspm_dataset model elements

spm_unique_ID(<sspm_fit>) `spm_unique_ID<-`(<sspm_fit>) spm_time(<sspm_fit>) `spm_time<-`(<sspm_fit>) spm_formulas(<sspm_fit>) `spm_formulas<-`(<sspm_fit>) spm_smoothed_data(<sspm_fit>) `spm_smoothed_data<-`(<sspm_fit>) spm_get_fit() `spm_get_fit<-`() spm_boundaries(<sspm_fit>) `spm_boundaries<-`(<sspm_fit>) spm_boundary(<sspm_fit>) `spm_boundary<-`(<sspm_fit>)

Accessing OR replacing sspm_fit model elements

spm_name() `spm_name<-`() spm_datasets() `spm_datasets<-`() spm_boundaries() `spm_boundaries<-`() spm_smoothed_data() `spm_smoothed_data<-`() spm_time() `spm_time<-`() is_split() `is_split<-`() spm_unique_ID() `spm_unique_ID<-`()

Accessing OR replacing sspm model elements

sspm_boundary-class

sspm boundary structure

`$`(<sspm_boundary>) `$`(<sspm_discrete_boundary>) `$`(<sspm_dataset>) `$`(<sspm>)

Extract methods

raw_formula() `raw_formula<-`() translated_formula() `translated_formula<-`() formula_vars() `formula_vars<-`() formula_type() `formula_type<-`() is_fitted() `is_fitted<-`() spm_response() `spm_response<-`() spm_lagged_vars() `spm_lagged_vars<-`()

Accessing OR replacing sspm_formula model elements

method_func() `method_func<-`() spm_name(<discretization_method>) `spm_name<-`(<discretization_method>)

Accessing OR replacing discretization_method model elements