BHfitting: BHfitting function

Description Usage Arguments Examples

View source: R/BHfitting.R

Description

Function to do the actual parallelised Beverton holt fitting of the models

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
BHfitting(
  BH.code,
  dd,
  K.prior,
  r0.prior,
  d.prior,
  N0.prior,
  sdev.prior,
  cores.to.use,
  iter,
  warmup,
  chains
)

Arguments

BH.code

Stan code generated by the GenerateBHcode functions

dd

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

K.prior

Prior value for the mean 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

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

sdev.prior

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

cores.to.use

Available cores to do the bayesian models

iter

Number of iterations to run for the model, defaults to 1e4. Must be integer

warmup

Number of iterations to run warmup. Defaults to 1e3. Must be integer and smaller than warmup

chains

Number of chains to run for each fit. Must be integer. Defaults to 1

Ksd.prior

Prior value for the standard deviation on carrying capacity (K). 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

N0sd.prior

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

Examples

1

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