Skip to contents

Assembles the single named list that model_2a.jags consumes, by combining the prepared longitudinal data (prep_data(), reused unchanged from Chapter 1) with the Model 2a priors (prep_priors_2a()). The biomarker labels from prep_data() are carried along as an attribute so downstream summaries can label the two biomarkers.

Usage

jags_data_2a(data, prec_lambda = 0.25, add_newperson = TRUE, ...)

Arguments

data

A data.frame in serocalculator case-data format (columns antigen_iso, visit_num, a value column, and a time column).

prec_lambda

Prior precision of the factor loadings, forwarded to prep_priors_2a(). Default 0.25.

add_newperson

logical; forwarded to prep_data(). Default TRUE to match Chapter 1 (adds a dummy subject for posterior prediction).

...

Additional Chapter 1 prior arguments forwarded to prep_priors_2a().

Value

A named list of JAGS inputs, with attribute "antigens" (the biomarker labels) and "ids" (subject ids).