Package: sspm 1.0.3

sspm: Spatial Surplus Production Model Framework for Northern Shrimp Populations
Implement a GAM-based (Generalized Additive Models) spatial surplus production model (spatial SPM), aimed at modeling northern shrimp population in Atlantic Canada but potentially to any stock in any location. The package is opinionated in its implementation of SPMs as it internally makes the choice to use penalized spatial gams with time lags. However, it also aims to provide options for the user to customize their model. The methods are described in Pedersen et al. (2022, <https://www.dfo-mpo.gc.ca/csas-sccs/Publications/ResDocs-DocRech/2022/2022_062-eng.html>).
Authors:
sspm_1.0.3.tar.gz
sspm_1.0.3.zip(r-4.5)sspm_1.0.3.zip(r-4.4)sspm_1.0.3.zip(r-4.3)
sspm_1.0.3.tgz(r-4.5-any)sspm_1.0.3.tgz(r-4.4-any)sspm_1.0.3.tgz(r-4.3-any)
sspm_1.0.3.tar.gz(r-4.5-noble)sspm_1.0.3.tar.gz(r-4.4-noble)
sspm_1.0.3.tgz(r-4.4-emscripten)sspm_1.0.3.tgz(r-4.3-emscripten)
sspm.pdf |sspm.html✨
sspm/json (API)
NEWS
# Install 'sspm' in R: |
install.packages('sspm', repos = c('https://pedersen-fisheries-lab.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/pedersen-fisheries-lab/sspm/issues
Pkgdown site:https://pedersen-fisheries-lab.github.io
- borealis_simulated - Simulated biomass data
- catch_simulated - Simulated catch data
- predator_simulated - Simulated predator data
- sfa_boundaries - SFA boundaries data
Last updated 9 days agofrom:c3f25bf4c5. Checks:8 OK. Indexed: yes.
Target | Result | Latest binary |
---|---|---|
Doc / Vignettes | OK | Feb 13 2025 |
R-4.5-win | OK | Feb 13 2025 |
R-4.5-mac | OK | Feb 13 2025 |
R-4.5-linux | OK | Feb 13 2025 |
R-4.4-win | OK | Feb 13 2025 |
R-4.4-mac | OK | Feb 13 2025 |
R-4.3-win | OK | Feb 13 2025 |
R-4.3-mac | OK | Feb 13 2025 |
Exports:%>%as_discretization_methodformula_typeformula_type<-formula_varsformula_vars<-is_fittedis_fitted<-is_mappedis_mapped<-is_splitis_split<-method_funcmethod_func<-plotpredictpredict_intervalsraw_formularaw_formula<-smooth_lagsmooth_spacesmooth_space_timesmooth_timespmspm_aggregatespm_aggregate_catchspm_as_boundaryspm_as_datasetspm_biomass_varsspm_biomass_vars<-spm_boundariesspm_boundaries<-spm_boundaryspm_boundary_areaspm_boundary_area<-spm_boundary<-spm_coords_colspm_coords_col<-spm_dataspm_data<-spm_datasetsspm_datasets<-spm_density_varsspm_density_vars<-spm_discret_methodspm_discret_method<-spm_discretizespm_formulasspm_formulas<-spm_get_fitspm_get_fit<-spm_lagspm_lagged_varsspm_lagged_vars<-spm_methodsspm_namespm_name<-spm_patchesspm_patches_areaspm_patches_area<-spm_patches<-spm_pointsspm_points<-spm_responsespm_response<-spm_smoothspm_smooth_methodsspm_smoothed_dataspm_smoothed_data<-spm_smoothed_fitspm_smoothed_fit<-spm_smoothed_varsspm_smoothed_vars<-spm_splitspm_timespm_time<-spm_unique_IDspm_unique_ID<-sspmsummarytesselate_voronoitranslated_formulatranslated_formula<-triangulate_delaunay
Dependencies:backportscheckmateclassclassIntclicpp11DBIdplyre1071fansigenericsglueKernSmoothlatticelifecyclemagrittrMASSMatrixmgcvnlmepillarpkgconfigproxypurrrR6Rcpprlangs2sfstringistringrtibbletidyrtidyselectunitsutf8vctrswithrwk
An example with simulated data
Rendered fromAn_example_with_simulated_data.Rmd
usingknitr::rmarkdown
on Feb 13 2025.Last update: 2023-05-15
Started: 2022-04-19
Package and workflow design
Rendered fromPackage_and_workflow_design.Rmd
usingknitr::rmarkdown
on Feb 13 2025.Last update: 2023-05-15
Started: 2022-04-19
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Extract methods | $,sspm-method $,sspm_boundary-method $,sspm_dataset-method $,sspm_discrete_boundary-method extract |
Cast into a 'discretization_method' object | as_discretization_method as_discretization_method,character,ANY-method as_discretization_method,missing,function-method |
Simulated biomass data | borealis_simulated |
Simulated catch data | catch_simulated |
sspm discretization method class | discretization_method-class |
Accessing OR replacing 'discretization_method' model elements | method_func method_func,discretization_method-method method_func<- method_func<-,discretization_method-method spm_name,discretization_method-method spm_name<-,discretization_method-method |
Plot 'sspm' objects | plot plot,sspm_boundary,missing-method plot,sspm_dataset,missing-method plot,sspm_fit,missing-method plot.sspm |
Simulated predator data | predator_simulated |
Predict with a SPM model | predict predict,sspm_dataset-method predict,sspm_fit-method predict.sspm |
GAM confidence and prediction intervals | predict_intervals |
Accessing OR replacing 'sspm_formula' model elements | formula_type formula_type,sspm_formula-method formula_type<- formula_type<-,sspm_formula-method formula_vars formula_vars,sspm_formula-method formula_vars<- formula_vars<-,sspm_formula-method is_fitted is_fitted,sspm_formula-method is_fitted<- is_fitted<-,sspm_formula-method raw_formula raw_formula,sspm_formula-method raw_formula<- raw_formula<-,sspm_formula-method spm_lagged_vars spm_lagged_vars,sspm_formula-method spm_lagged_vars<- spm_lagged_vars<-,sspm_formula-method spm_response spm_response,sspm_formula-method spm_response<- spm_response<-,sspm_formula-method translated_formula translated_formula,sspm_formula-method translated_formula<- translated_formula<-,sspm_formula-method |
SFA boundaries data | sfa_boundaries |
sspm Smoothing functions | smooth_lag smooth_lag,ANY,sf,sspm_discrete_boundary-method smooth_space smooth_space,sf,sspm_discrete_boundary-method smooth_space_time smooth_space_time,sf,sspm_discrete_boundary-method smooth_time smooth_time,sf,sspm_discrete_boundary-method |
Fit an SPM model | spm spm,sspm,formula-method spm,sspm,missing-method |
Aggregate a dataset or fit data variable based on a boundary | spm_aggregate spm_aggregate,sspm_dataset,missing-method spm_aggregate,sspm_dataset,sspm_discrete_boundary-method |
Update biomass value from catch adta | spm_aggregate_catch spm_aggregate_catch,sspm_dataset,sspm_dataset,character,character-method |
Create a sspm_boundary object | spm_as_boundary spm_as_boundary,ANY,missing,ANY,ANY-method spm_as_boundary,missing,ANY,ANY,ANY-method spm_as_boundary,sf,character,ANY,ANY-method spm_as_boundary,sf,character,missing,missing-method |
Create a 'sspm_dataset' dataset structure | spm_as_dataset spm_as_dataset,data.frame,ANY,ANY,ANY,character-method spm_as_dataset,data.frame,ANY,ANY,ANY,list-method spm_as_dataset,data.frame,ANY,ANY,ANY,missingOrNULL-method spm_as_dataset,sf,ANY,ANY,ANY,ANY-method |
Accessing OR replacing 'sspm_boundary' model elements | spm_boundaries,sspm_boundary-method spm_boundaries<-,sspm_boundary-method spm_boundary spm_boundary,sspm_boundary-method spm_boundary<- spm_boundary<-,sspm_boundary-method spm_boundary_area spm_boundary_area,sspm_boundary-method spm_boundary_area<- spm_boundary_area<-,sspm_boundary-method spm_discret_method spm_discret_method,sspm_discrete_boundary-method spm_discret_method<- spm_discret_method<-,sspm_discrete_boundary-method spm_patches spm_patches,sspm_discrete_boundary-method spm_patches<- spm_patches<-,sspm_discrete_boundary-method spm_patches_area spm_patches_area,sspm_discrete_boundary-method spm_patches_area<- spm_patches_area<-,sspm_discrete_boundary-method spm_points spm_points,sspm_discrete_boundary-method spm_points<- spm_points<-,sspm_discrete_boundary-method |
Accessing OR replacing 'sspm_dataset' model elements | is_mapped is_mapped,sspm_dataset-method is_mapped<- is_mapped<-,sspm_dataset-method spm_biomass_vars spm_biomass_vars,sspm_dataset-method spm_biomass_vars<- spm_biomass_vars<-,sspm_dataset-method spm_boundaries,sspm_dataset-method spm_boundaries<-,sspm_dataset-method spm_coords_col spm_coords_col,sspm_dataset-method spm_coords_col<- spm_coords_col<-,sspm_dataset-method spm_data spm_data,sspm_dataset-method spm_data<- spm_data<-,sspm_dataset-method spm_density_vars spm_density_vars,sspm_dataset-method spm_density_vars<- spm_density_vars<-,sspm_dataset-method spm_formulas spm_formulas,sspm_dataset-method spm_formulas<- spm_formulas<-,sspm_dataset-method spm_name,sspm_dataset-method spm_name<-,sspm_dataset-method spm_smoothed_data,sspm_dataset-method spm_smoothed_data<-,sspm_dataset-method spm_smoothed_fit spm_smoothed_fit,sspm_dataset-method spm_smoothed_fit<- spm_smoothed_fit<-,sspm_dataset-method spm_smoothed_vars spm_smoothed_vars,sspm_dataset-method spm_smoothed_vars<- spm_smoothed_vars<-,sspm_dataset-method spm_time,sspm_dataset-method spm_time<-,sspm_dataset-method spm_unique_ID,sspm_dataset-method spm_unique_ID<-,sspm_dataset-method |
Discretize a 'sspm' model object | spm_discretize spm_discretize,sspm_boundary,ANY,missing-method spm_discretize,sspm_boundary,character,ANY-method spm_discretize,sspm_boundary,discretization_method,ANY-method spm_discretize,sspm_boundary,function,ANY-method spm_discretize,sspm_boundary,missing,ANY-method |
Create lagged columns in a sspm smoothed data slot | spm_lag spm_lag,sspm-method spm_lag,sspm_fit-method |
Get the list of available discretization methods | spm_methods |
Accessing OR replacing 'sspm' model elements | is_split is_split,sspm-method is_split<- is_split<-,sspm-method spm_ spm_boundaries spm_boundaries,sspm-method spm_boundaries<- spm_boundaries<-,sspm-method spm_datasets spm_datasets,sspm-method spm_datasets<- spm_datasets<-,sspm-method spm_name spm_name<- spm_smoothed_data spm_smoothed_data,sspm-method spm_smoothed_data<- spm_smoothed_data<-,sspm-method spm_time spm_time,sspm-method spm_time<- spm_time<-,sspm-method spm_unique_ID spm_unique_ID,sspm-method spm_unique_ID<- spm_unique_ID<-,sspm-method |
Smooth a variable in a sspm dataset | spm_smooth spm_smooth,sspm_dataset,formula,sspm_discrete_boundary-method |
Get the list of available smoothing methods | spm_smooth_methods |
Split data in test and train sets | spm_split spm_split,sspm-method |
Accessing OR replacing 'sspm_fit' model elements | spm_boundaries,sspm_fit-method spm_boundaries<-,sspm_fit-method spm_boundary,sspm_fit-method spm_boundary<-,sspm_fit-method spm_formulas,sspm_fit-method spm_formulas<-,sspm_fit-method spm_get_fit spm_get_fit,sspm_fit-method spm_get_fit<- spm_get_fit<-,sspm_fit-method spm_smoothed_data,sspm_fit-method spm_smoothed_data<-,sspm_fit-method spm_time,sspm_fit-method spm_time<-,sspm_fit-method spm_unique_ID,sspm_fit-method spm_unique_ID<-,sspm_fit-method |
Create a 'sspm' model object | sspm sspm,sspm_dataset,list-method sspm,sspm_dataset,missing-method sspm,sspm_dataset,sspm_dataset-method |
sspm boundary structure | sspm_boundary-class |
sspm dataset structure | sspm_dataset-class |
sspm discrete boundary structure | sspm_discrete_boundary-class |
sspm fit | sspm_fit-class |
sspm formula object | sspm_formula-class |
sspm model class | sspm-class |
Summarises 'sspm_fit' objects | summary summary,sspm_fit-method summary.sspm |
Perform voronoi tesselation | tesselate_voronoi |
Perform delaunay triangulation | triangulate_delaunay |