extract_history_parameter: Extracts a history parameter as a matrix

View source: R/extract_history_parameter.R

extract_history_parameterR Documentation

Extracts a history parameter as a matrix

Description

Extracts a history parameter as a matrix with samplesN rows and randomN (found in object$data$randomN) columns.

Usage

extract_history_parameter(
  object,
  param_name,
  samplesN = NULL,
  link_function = NULL
)

Arguments

object

A cumhist object

param_name

String, a name of the parameter

samplesN

Number of samples, if NULL is computed from rstan (but it is cheaper to do this once).

link_function

A link function to use (exp or inv.logit) or NULL for identity.

Value

Matrix with samplesN rows and randomN (found in object$data$randomN) columns

Examples


br_fit <- fit_cumhist(br_singleblock, state="State", duration="Duration")
extract_history_parameter(br_fit, "tau", link_function = exp)


bistablehistory documentation built on Sept. 13, 2023, 5:07 p.m.