This network model is the model used in the Quick Start tutorial
vignette. It is ready to be run at once with run_mcmc
.
aquarium_mod
An object of class networkModel
(inherits from tbl_df
, tbl
, data.frame
) with 1 rows and 4 columns.
The code used to built the model is given in the example section below.
The aquarium_run
dataset is a corresponding MCMC run.
library(tibble)
library(dplyr)
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
exp <- tibble::tribble(
~time.day, ~species, ~biomass, ~prop15N,
0, "algae", 1.02, 0.00384,
1, "algae", NA, 0.0534,
1.5, "algae", 0.951, NA,
2, "algae", 0.889, 0.0849,
2.5, "algae", NA, 0.0869,
3, "algae", 0.837, 0.0816,
0, "daphnia", 1.74, 0.00464,
1, "daphnia", NA, 0.00493,
1.5, "daphnia", 2.48, NA,
2, "daphnia", NA, 0.00831,
2.5, "daphnia", 2.25, NA,
3, "daphnia", 2.15, 0.0101,
0, "NH4", 0.208, 0.79,
1, "NH4", 0.227, NA,
1.5, "NH4", NA, 0.482,
2, "NH4", 0.256, 0.351,
2.5, "NH4", NA, 0.295,
3, "NH4", 0.27, NA
)
inits <- exp %>% dplyr::filter(time.day == 0)
obs <- exp %>% dplyr::filter(time.day > 0)
aquarium_mod <- new_networkModel() %>%
set_topo("NH4 -> algae -> daphnia -> NH4") %>%
set_init(inits, comp = "species", size = "biomass",
prop = "prop15N") %>%
set_obs(obs, comp = "species", size = "biomass",
prop = "prop15N", time = "time.day")
#> Using default distribution family for proportions ("gamma_cv").
#> (eta is the coefficient of variation of gamma distributions.)
#> Using default distribution family for sizes ("normal_cv").
#> (zeta is the coefficient of variation of normal distributions.)