Learn R Programming

morseTKTD (version 0.1.3)

ModelData: Create a list giving data to use in Bayesian inference.

Description

Function to build the data list to give to stan

  1. Order the data set in replicate and then in time to create a new column i_row used to delimited replicates.

  2. Create a matrix of replicate and index "id_row"

  3. Compute Nprec = lag of Nsurv

  4. return a list of element to be passed to Stan sampler

Create a list of scalars giving priors to use in Bayesian inference.

Usage

modelData(data, model_type, ...)

# S3 method for SurvData modelData(data, model_type = c("SD", "IT"), hb_value = NULL, ...)

build_stanData(x)

build_priors(x, model_type = c("SD", "IT"), hb_value = NULL)

Value

A list for parameterization of priors for Bayesian inference.

A list for parameterization of priors for Bayesian inference with JAGS.

Arguments

data

An object of class SurvData

model_type

TKTD model type ('SD' or 'IT')

...

Further arguments to be passed to generic methods

hb_value

default is NULL, can be fixed by specifying a numeric.

x

An object of class survData