GenerateBHcode: GenerateBHcode function

Description Usage Arguments Examples

View source: R/GeneratBHcode.R

Description

Generates the stan code to be used for the models, basd on the prior information provided. This allows to only compile one model for all data, saving a lot of computing time.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
GenerateBHcode(
  K.prior,
  Ksd.prior,
  r0.prior,
  r0sd.prior,
  d.prior,
  dsd.prior,
  N0.prior,
  N0sd.prior,
  sdev.prior
)

Arguments

K.prior

Prior value for the mean carrying capacity (K). Must be on log scale and numeric

Ksd.prior

Prior value for the standard deviation on carrying capacity (K). Must be on log scale and numeric

r0.prior

Prior value for the mean intrinsic rate of growth (r0). Must be on log scale and numeric

r0sd.prior

Prior value for the standard deviation on intrinsic rate of growth (r0). Must be on log scale and numeric

d.prior

Prior value for the mean death rate (d). Must be on log scale and numeric

N0.prior

Prior value for the mean starting population size (N0). Must be on log scale and numeric

N0sd.prior

Prior value for the standard deviation on starting population size (N0). Must be on log scale and numeric

sdev.prior

Prior value for the standard deviation for the model fitting. Must be numeric. Defaults to 1.

dd

Dataframe with columns for population size data (colname=popsize), time data (colname=time) and unique identifiers for each population (colname=ident)

Examples

1

femoerman/PBPGM documentation built on Aug. 22, 2021, 11:46 p.m.