calculate_lik_matrix: Calculate per data point likelihood matrix

Description Usage Arguments Value

View source: R/analyses.R

Description

From the output of an MCMC chain, calculates the likelihood of observing each data point. This can then be used in loo::loo

Usage

1
2
calculate_lik_matrix(chain, parTab, dat, f, N, nindiv = 3,
  generate_labels = TRUE)

Arguments

chain

the MCMC chain with each row corresponding to an iteration

parTab

the parameter table used for this chain

dat

the data frame of data used to solve the likelihood

f

pointer to the model function used in the MCMC procedure

N

number of samples to take from the MCMC chain

nindiv

the number of individuals in each group/strain combination

generate_labels

if TRUE, generates labels to match each estimated k value to the correct data point. This only works if using data with an experimental design matching the protocol

Value

a matrix of same dimensions as dat


jameshay218/antibodyKinetics documentation built on Nov. 8, 2019, 11 a.m.