Package: metafolio 0.1.2

metafolio: Metapopulation Simulations for Conserving Salmon Through Portfolio Optimization

A tool to simulate salmon metapopulations and apply financial portfolio optimization concepts. The package accompanies the paper Anderson et al. (2015) <doi:10.1101/2022.03.24.485545>.

Authors:Sean C. Anderson [aut, cre], Jonathan W. Moore [ctb], Michelle M. McClure [ctb], Nicholas K. Dulvy [ctb], Andrew B. Cooper [ctb]

metafolio_0.1.2.tar.gz
metafolio_0.1.2.zip(r-4.5)metafolio_0.1.2.zip(r-4.4)metafolio_0.1.2.zip(r-4.3)
metafolio_0.1.2.tgz(r-4.4-x86_64)metafolio_0.1.2.tgz(r-4.4-arm64)metafolio_0.1.2.tgz(r-4.3-x86_64)metafolio_0.1.2.tgz(r-4.3-arm64)
metafolio_0.1.2.tar.gz(r-4.5-noble)metafolio_0.1.2.tar.gz(r-4.4-noble)
metafolio_0.1.2.tgz(r-4.4-emscripten)metafolio_0.1.2.tgz(r-4.3-emscripten)
metafolio.pdf |metafolio.html
metafolio/json (API)

# Install 'metafolio' in R:
install.packages('metafolio', repos = c('https://seananderson.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/seananderson/metafolio/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3

On CRAN:

4.88 score 2 stars 75 scripts 697 downloads 24 exports 5 dependencies

Last updated 10 months agofrom:edafee56a0. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 31 2024
R-4.5-win-x86_64OKOct 31 2024
R-4.5-linux-x86_64OKOct 31 2024
R-4.4-win-x86_64OKOct 31 2024
R-4.4-mac-x86_64OKOct 31 2024
R-4.4-mac-aarch64OKOct 31 2024
R-4.3-win-x86_64OKOct 31 2024
R-4.3-mac-x86_64OKOct 31 2024
R-4.3-mac-aarch64OKOct 31 2024

Exports:count_quasi_extscreate_asset_weightsCVaRfit_rickergenerate_env_tsgenerate_straying_matrixget_port_valsgg_color_hueimpl_errormeta_simmonte_carlo_portfoliosplot_cons_plansplot_correlation_between_returnsplot_efficient_portfoliosplot_rickersplot_sim_tsplot_sp_A_tsrickerricker_escapementricker_v_trun_cons_plansthermal_curve_athermal_integrationVaR

Dependencies:colorspaceMASSplyrRcppRcppArmadillo

An introduction to the metafolio R package

Rendered frommetafolio.Rnwusingknitr::knitron Oct 31 2024.

Last update: 2014-07-08
Started: 2013-11-02

Readme and manuals

Help Manual

Help pageTopics
Add a kernel density polygonadd_dens_polygon
Add annotations to panelannotate
Take 'meta_sim' output objects and count quasi extinctionscount_quasi_exts
Create an asset weights matrixcreate_asset_weights
Custom bandwidthcustom_bw
Conditional Value at RiskCVaR
Get beta parameters from mean and varianceest_beta_params
Super fast linear regressionfastlm
Fit Ricker linear regressionfit_ricker
Create an environmental time series.generate_env_ts
Generate a matrix of straying proportions within a metapopulationgenerate_straying_matrix
Run simulation for conservation schemesget_conserv_plans_mv
Get the efficient frontier from mean and variance valuesget_efficient_frontier
Get portfolio mean and variance valuesget_port_vals
Get quantile contourget_quantile_contour
ggplot2-like colour scale in HCL spacegg_color_hue
Add implementation errorimpl_error
Check if x is an element of y.is_element
Run a single metapopulation simulation.meta_sim
metafolio: An R package to simulate metapopulations for portfolio optimizationmetafolio-package metafolio
Base-level metapopulation simulation functionmetasim_base
Monte Carlo asset weights into portfoliosmonte_carlo_portfolios
Add a pretty axismy.axis
Optimize to find optimal max productivity Ricker aoptim_thermal
Plot conservation plans in mean-variance spaceplot_cons_plans
Plot correlation of returns (i.e. metapopulation abundance) across stocks.plot_correlation_between_returns
Basic plot of efficient portfolio and asset contributionsplot_efficient_portfolios
Standard matrix plot of values by stream for one panel:plot_panel_lines
Plot sample Ricker curves for each stockplot_rickers
Plot various time series from a simulation runplot_sim_ts
Plot sample time series from a portfolio simulationplot_sp_A_ts
A simple Ricker modelricker
Assign a salmon escapement target based on a Ricker curvericker_escapement
Ricker stock-recruit function with specified errorricker_v_t
Run conservation plans and return the portfolio mean and variance valuesrun_cons_plans
Return desired squared deviation between desired area and actual area under a curvethermal_area
Create thermal tolerance curves.thermal_curve_a
Integrate thermal tolerance curves to get maximum Ricker a valuesthermal_integration
Value at RiskVaR