Specifies a non-parametric prior for subject random effects and adds additional sets of dose or exposure random effects
that are linked to subjects through a multiple membership construction for application to repeated measures data on subjects.
One class of models employs a set of by-subject random effect parameters under a Dirichlet process (DP) prior
with the addition of one or more sets of multiple membership (MM) effects that map by-dose effects to subject
for data characterized by repeated measures on subject. There may be specified q
random effect parameters per
subject, possibly equal to the number of measurement waves, T
, as the DP prior borrows estimation strength
across subjects. Another class of models employs a single set of by-subject effects under a dependent DP (DDP) prior for a
collection of random distributions that are indexed by MM dose or sequence. Each set of subject random effects
under the DDP formulation are now indexed by a full set of MM sequences (for all subjects).CORE "ENGINE" FUNCTIONS
dpgrow
performs Bayesian mixed effects estimation for data characterized by repeated subject measures
(typically in time). The user inputs a subject
identifier vector, a vector of time
measurements,
and a trt
vector for treatment/group assignments. Fixed and random effects are then automatically
generated and both subject and treatment level growth curves are constructed.
dpgrowmm
is very similar to dpgrow
, but it adds an additional set of exposure random effects
which aren't grouped by subject that may be used to inject treatment dosage or attendance patterns that
is mapped back to clients via a multiple membership weight matrix. The option multi = TRUE
specifies
each exposure random effect as polynomial in time as is done for the by-subject effects.
dpgrowmult
is very similar to dpgrowmm
, but it allows more than one set of multiple
membership effects. Each multiple membership effects term (block) may apply to any sub-set of subjects
through specification of the weight matrix and identification of affected subjects for that term.
ddpgrow
generalizes dpgrowmm
and dpgrowmult
by indexing the
subject random effects with a set of exposures linked to subjects from an MM weight matrix. This model
brings the MM term inside the DP by specifying a set of dose-based (MM) random effects for each subject.
The model formally employs a dependent DP (DDP) prior on a set of subject effects with the a single unknown
prior distribution now replaced by a collection of unknown distributions indexed by dosage pattern. For example,
a dosage or exposure may be characterized by a sequence of cognitive behavior therapy sessions attended.
CORE "ACCESSOR" (PLOT) FUNCTIONS
growplot
uses model outputs from dpgrow
, dpgrowmm
, dpgrowmult
and ddpgrow
to provide by-subject growth curves in two forms: 1. Growth curves aggregated under specified groupings;
2. Indvidual growth curves plotted along with data for selected (or random subset of) subjects.
trtplot
uses model outputs from dpgrow
, dpgrowmm
, dpgrowmult
and ddpgrow
to plot a distribution for fixed mean effects difference between two selected treatments
across a range of chosen models for a one or more chosen time points.
Outputs include a set of boxplots for each time point that span 95
effectsplot
uses model outputs from dpgrow
, dpgrowmm
and dpgrowmult
to overlay plots of multiple membership effects for a given term under use of different prior
formulations and/or from distinctly formulated models (e.g. with varying numbers of
multiple membership terms).
ddpEffectsplot
uses model outputs from ddpgrow
to produce by subject and by clusters of subjects summaries for the q x (S+1)
multivariate random
effects for each subject, where S
denotes the number of unique dosages across all subjects,
and q
denotes the polynomial order for each of the S+1
effects. There is also
a q x 1
set of subject intercept effects. This function is analogous to effectsplot
,
only each client now has its own set of MM random effects.
SIMULATED DATA SETS
There are 3 simulated data sets available in order to allow exploration of the engine
and associated accessor functions.
datsim
Simulated dataset with two treatment arms (treatment and control) composed from a
model with a Dirichlet process (DP) prior on the set of client effects and a single MM term under a
"mmcar"
formulation. Structured to express similar properties as the case example in both
Savitsky and Paddock (2012) references, below.
datsimcov
Of similar structre to simdat
, only the data generating model now
additionally employs 2 nuisance fixed effects.
datsimmult
Simulated data under 2 treatment arms generated from a model with now
2 multiple membership terms. The terms are generated under c("mmi","mmcar")
prior formulations.
BENCHMARK DATA SETS
datbrghtterms
Data derived from BRIGHT study reviewed in reference and includes
BDI-II depressive symptom scores for client experimental units. Associated data objects
are included to facilitate runs under engine functions dpgrow
, dpgrowmm
and dpgrowmult
.
datbrghtmodterms
Data derived from BRIGHT study reviewed in reference and includes
BDI-II depressive symptom scores for client experimental units. CBT treatment sessions are collected into
higher level modules. All objects are then specified by module, rather than session. These data
may be used with any engine function, though were created to facilitate use of ddpgrow
. Data
objects are included, therefore, to enable employment of ddpgrow
, as well as the other engine
functions.
dateduc
Tests for students tracked for 5 years from grades 1 - 5 for a single school in
a large urban school district. Associated data objects are included to facilitate runs under engine
functions dpgrow
, dpgrowmm
, ddpgrow
.