Package: macpan2 1.11.1

Steve Walker

macpan2: Fast and Flexible Compartmental Modelling

Fast and flexible compartmental modelling with Template Model Builder.

Authors:Steve Walker [cre, aut], Weiguang Guan [aut], Jen Freeman [aut], Ben Bolker [aut], Darren Flynn-Primrose [aut], Irena Papst [ctb], Michael Li [ctb]

macpan2_1.11.1.tar.gz
macpan2_1.11.0.zip(r-4.5)macpan2_1.11.1.zip(r-4.4)macpan2_1.11.1.zip(r-4.3)
macpan2_1.11.1.tgz(r-4.4-x86_64)macpan2_1.11.1.tgz(r-4.4-arm64)macpan2_1.11.1.tgz(r-4.3-x86_64)macpan2_1.11.1.tgz(r-4.3-arm64)
macpan2_1.11.0.tar.gz(r-4.5-noble)macpan2_1.11.1.tar.gz(r-4.4-noble)
macpan2_1.11.1.tgz(r-4.4-emscripten)macpan2_1.11.1.tgz(r-4.3-emscripten)
macpan2.pdf |macpan2.html
macpan2/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/canmod/macpan2/issues

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

On CRAN:

compartmental-modelsepidemiologyforecastingmixed-effectsmodel-fittingoptimizationsimulationsimulation-modeling

8.53 score 2 stars 1 packages 234 scripts 120 exports 12 dependencies

Last updated 6 days agofrom:22a5583be7. Checks:OK: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 15 2024
R-4.5-win-x86_64NOTENov 06 2024
R-4.5-linux-x86_64NOTENov 06 2024
R-4.4-win-x86_64NOTENov 15 2024
R-4.4-mac-x86_64NOTENov 15 2024
R-4.4-mac-aarch64NOTENov 15 2024
R-4.3-win-x86_64NOTENov 15 2024
R-4.3-mac-x86_64NOTENov 15 2024
R-4.3-mac-aarch64NOTENov 15 2024

Exports:all_consistentall_equalall_not_equalBinaryOperatorCSVReaderempty_matrixengine_evalfinalizer_charfinalizer_indexfind_all_pathsinitial_valid_varsJSONReaderLogLogitmake_expr_parsermp_absolute_flowmp_aggregatemp_cartesianmp_defaultmp_default_listmp_dynamic_modelmp_dynamic_simulatormp_effects_descrmp_eulermp_euler_multinomialmp_expandmp_extractmp_factorsmp_finalmp_final_listmp_fitmp_flow_framemp_groupmp_hazardmp_identitymp_indexmp_initialmp_initial_listmp_joinmp_labelsmp_layout_gridmp_layout_pathsmp_ledgersmp_linearmp_logmp_log_normalmp_logitmp_logit_normalmp_lookupmp_model_startermp_neg_binmp_nofitmp_normalmp_optimizemp_optimizer_outputmp_parmp_per_capita_flowmp_per_capita_inflowmp_per_capita_outflowmp_poissonmp_positionsmp_rbfmp_reducemp_referencemp_renamemp_rk4mp_set_numbersmp_setdiffmp_sim_boundsmp_simulatormp_slicesmp_sqrtmp_squaremp_state_dependence_framemp_state_varsmp_structured_vectormp_subsetmp_symmetricmp_time_scalemp_tmbmp_tmb_calibratormp_tmb_coefmp_tmb_deletemp_tmb_expr_listmp_tmb_fixef_covmp_tmb_insertmp_tmb_insert_reportsmp_tmb_librarymp_tmb_model_specmp_tmb_updatemp_tmbstan_coefmp_trajmp_trajectorymp_trajectory_ensemblemp_trajectory_replicatemp_trajectory_sdmp_trajectory_simmp_trianglemp_uniformmp_unionmp_zero_vectornlistnot_all_equalNULLReaderrbfReaderRReadershow_modelssimple_simsStringDataFromDottedStringDataFromFrameto_labelsto_nameto_name_pairsto_namesto_positionsto_stringto_valuesTransformTXTReader

Dependencies:cachemfastmapjsonlitelatticeMASSMatrixmemoiseoorRcppRcppEigenrlangTMB

Advanced Calibration

Rendered fromcalibration_advanced.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-04-08
Started: 2024-02-22

Advanced Specification of Time-Varying Parameters

Rendered fromtime_varying_parameters_advanced.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-04-08
Started: 2024-04-08

Article Status

Rendered fromvignette_status.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2023-05-31
Started: 2023-05-31

Calibrating Compartmental Models to Data

Rendered fromcalibration.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-10-04
Started: 2023-06-09

Composing Related Simulation Models

Rendered fromcomposing_simulation_models.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2023-06-14
Started: 2022-11-02

Debugging

Rendered fromdebugging.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-01-18
Started: 2024-01-18

Design Concepts

Rendered fromdesign_concepts.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-08-21
Started: 2024-01-19

Development Principles and Patterns

Rendered fromdevelopment_patterns.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-02-22
Started: 2023-05-31

Elementwise Binary Operators

Rendered fromelementwise_binary_operators.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2023-05-31
Started: 2022-11-02

Engine-Agnostic Model Specification Grammar

Rendered fromengine_agnostic_grammar.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-02-22
Started: 2024-01-18

Example Models

Rendered fromexample_models.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-02-22
Started: 2023-05-31

FAQs

Rendered fromFAQs.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-11-15
Started: 2024-11-06

Fitting to Real Data

Rendered fromreal_data.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-10-02
Started: 2024-02-26

ODE Solvers, Process Error, and Difference Equations

Rendered fromstate_updaters.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-10-02
Started: 2024-03-05

Quickstart

Rendered fromquickstart.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-11-06
Started: 2023-04-06

Specifying Likelihood and Prior Components

Rendered fromlikelihood_prior_specs.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-11-06
Started: 2024-10-07

Specifying Time-Varying Parameters

Rendered fromtime_varying_parameters.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-05-17
Started: 2023-05-31

State-Dependent Rates

Rendered fromstate_dependent_rates.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2023-05-31
Started: 2023-03-31

The C++ Side

Rendered fromcpp_side.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2023-05-31
Started: 2022-08-25

Readme and manuals

Help Manual

Help pageTopics
Binary OperatorBinaryOperator
Comparison Functionsall_consistent all_equal all_not_equal comparison not_all_equal
Distributionsdistribution mp_logit_normal mp_log_normal mp_neg_bin mp_normal mp_poisson mp_uniform
Empty Matrixempty_matrix
Engine Evaluationengine_eval
Engine Functionsassign block c cbind cbind_lag cbind_time clamp col_sums convolution cos dnbinom dnorm dpois engine_functions exp from_diag group_sums log matrix mean pgamma print proportions rbind rbind_lag rbind_time rbinom recycle rep reulermultinom rnbinom rnorm round row_sums rpois sd seq sum t time_group time_step time_var to_diag unpack `%*%` `%x%` `(` `*` `+` `-` `/` `:` `[` `^`
Finalizersfinalizer finalizer_char finalizer_index
Find all Pathsfind_all_paths
Fitting Distributional Parametersfit_distr_params mp_fit mp_nofit
Initial Valid Variablesinitial_valid_vars
LedgersLedgerDefinition
Generate an Arithmetic Expression Parsermake_expr_parser
Aggregate an Indexmp_aggregate
Cartesian Product of Index Tablesmp_cartesian
Default Valuesmp_default mp_default_list
Dynamic Modelmp_dynamic_model
TMB Simulator from Dynamic Modelmp_dynamic_simulator
Describe Statistical Effectsmp_add_effects_descr mp_effects_descr
State Updatesmp_euler mp_euler_multinomial mp_hazard mp_rk4
Expand Modelmp_expand
Extract Indexmp_extract
Factor an Indexmp_factors
Final Valuesmp_final mp_final_list
Flow Frame (experimental)mp_flow_frame
Group an Indexmp_group
Model Quantity Index Tablelabelling_column_names.Index labels.Index mp_index names.Index print.Index
Initial Valuesmp_initial mp_initial_list
Join Indexesmp_join
Index Labelsmp_labels
Flow Diagram Grid Layoutmp_layout_grid
Flow Diagram Grid Layoutmp_layout_paths
Bundle up Ledgersmp_ledgers
Linear Chain Productmp_linear
Lookupmp_lookup
Model Startermp_model_starter
Optimizemp_optimize mp_optimize.TMBCalibrator
Optimizer Outputmp_optimizer_output
Fit Parametersmp_par
Flowmp_absolute_flow mp_per_capita_flow mp_per_capita_inflow mp_per_capita_outflow
Position Vectorsmp_positions
Fit a Time-Varying Parameter with Radial Basis Functionsmp_rbf
Reduce Modelmp_reduce
Reference Indexmp_reference
Rename Index Columnsmp_rename
Simulation Bounds (Experimental)mp_sim_bounds
Simulatormp_simulator
Slice an indexmp_slices
Self Cartesian Productmp_square
State Dependence Framemp_state_dependence_frame
State Variablesmp_state_vars
Structured Vectorsmp_set_numbers mp_structured_vector
Subset of Indexesmp_setdiff mp_subset
Symmetric Self Cartesian Productmp_symmetric
Time Scalemp_time_scale
Get Underlying TMB Objectmp_tmb
Make TMB Calibratormp_tmb_calibrator
TMB Model Coefficient Tablemp_tmb_coef
Expression Listmp_tmb_expr_list
Covariance of Fixed Effect Estimatesmp_tmb_fixef_cov
Modify a TMB Model Specmp_tmb_delete mp_tmb_insert mp_tmb_update
Insert Reportsmp_tmb_insert_reports
TMB Librarymp_tmb_library
Specify a TMB Modelmp_tmb_model_spec
Model Coefficient Table with stanmp_tmbstan_coef
Trajectory Specificationmp_traj
Trajectorymp_trajectory mp_trajectory_ensemble mp_trajectory_replicate mp_trajectory_sd mp_trajectory_sim
Self Cartesian Product Excluding One Off-Diagonal Sidemp_triangle
Union of Indexesmp_union
Zero Vectormp_zero_vector
Names and Labelsnames_and_labels to_labels to_name to_names to_name_pairs to_values
Self Naming Listnlist
Radial Basis Functionsrbf
ReaderCSVReader JSONReader NULLReader Reader RReader TXTReader
Print a table of contents of available modelsshow_models
Simple Iterated Simulationsimple_sims
String Dataprint.StringData StringData StringDataFromDotted StringDataFromFrame
To Positionsto_positions
To Stringto_string
TransformIdentity Log Logit Transform
Distributional Parameter Transformationmp_identity mp_log mp_logit mp_sqrt transform_distr_param