Context dependence of reported model matrices
Source:R/ctContextDependence.R
ctContextDependence.RdA ctsem matrix cell may be written as an expression referencing a latent
process or a time dependent predictor – for instance
DRIFT[1,1] = '-log1p(exp(param)) * eta2'. Such a cell has no single
value. It has a value at an evaluation context: a latent state, a set
of time dependent predictor values, a time and an interval.
Details
ctsem's summaries and plots report a number for every cell, so for a model like this they must pick a point. There are two, and which one you get depends on what you asked for:
Population matrices (
summary,ctSummaryMatrices,ctDiscretePars(subjects='popmean'),ctTIpredEffects) are evaluated at the populationT0MEANSstate, with time dependent predictors at zero.Subject matrices (
ctSubjectPars,ctDiscretePars(subjects=)) are evaluated at each subject's last observed row.
Only ctKalman and ctPredict avoid the choice
entirely, because they run the filter and re-evaluate every cell at every
step.
A reference to an individually varying parameter is not affected by any of this. ctsem represents such a parameter as a carrier latent state with no drift and no diffusion, so a cell reading that state simply is the parameter, and the estimate at the subject's last row is the one that has seen all of that subject's data – the best available, not an arbitrary point. Only references to real dynamic processes, and to time dependent predictors, make a reported value conditional.
Functions affected by this attach the cells in question as
attr(x, 'contextDependent'), and say so once in a message.
ctModelIsNonlinear answers the question directly. With
backend='julia' the evaluation point can be chosen; see the
state argument of ctBackendParMatrices.