Reports the directions of the parameter space this data carries no information about, and the parameters involved in them, without fitting the model.
Usage
ctIdentify(
datalong,
model,
inits = NULL,
nstart = 3L,
spread = 0.5,
priors = FALSE,
cores = getOption("mc.cores", 2L),
verbose = 0L,
rtol = 1e-13,
seed = 1L,
...
)Arguments
- datalong
Long format data, as for
ctFit.- model
Model from
ctModel.- inits
Optional evaluation point. Supplying one uses that single point and disables the comparison across points described in Details.
- nstart
Number of points to evaluate. The first is the origin of the unconstrained space; the rest are dispersed draws around it.
- spread
Standard deviation of the additional evaluation points on the raw scale. Large enough that they are genuinely different points, which
ctFit's ownrnorm(npar, 0, 0.01)initialisation is not.- priors
Whether to include the prior.
FALSEby default, because the question is what the data can inform: a prior informs every direction, so a model unidentified by its data looks fine with priors on and the check stops being able to say anything.- cores
As for
ctFit, and also the subject-chunk ceiling for every engine call this function makes, restored on exit.- verbose
As for
ctFit.- rtol
A direction counts as uninformed when the information along it falls below this fraction of the best-informed direction's. The default separates zero from merely small: on the scaled information a structurally unidentified direction sits at machine precision (measured: 7e-17), while a weakly identified one on a comparable model sat at 3e-12. Raise it to catch weak directions too, at the cost of reporting some a fit would have settled.
- seed
Seed for the dispersed evaluation points, so that two identical calls give identical output. The session's random stream is restored afterwards, so this neither depends on it nor disturbs it.
NULLdraws from the session stream instead, which makes the result depend on where that had got to.- ...
Further arguments to
ctFitthat shape the model, such asintoverpoporpoprank, with ctFit's defaults.
Value
An object of class ctIdentify with $parameters (names
in the flat subspace at every evaluation point), $partial and
$structural splitting those into the partially and completely
unidentified, $sometimes (in a flat direction beyond that subspace
at some points), $rotating (whether the basis of the flat subspace
turns between points), $nweak, $condition,
$starts holding the per-point detail, and $effects, the
random-effect information at a supplied inits (NULL
otherwise). Printing it summarises what was found.
Details
This catches structural non-identification – parameters that only appear together, a latent process nothing measures, a scale that is never fixed – which is a property of the model and holds wherever it is evaluated. It is not a verdict on the model: a direction that is flat at one point may be perfectly informed at the estimate, which is why several points are used and only parameters lying in the flat subspace at every one of them are reported as uninformed.
The model is prepared by ctFit, with any of its arguments
given in ..., so what is checked is the model a fit with the same
arguments would estimate.
Not every flat direction means the same thing. A random effect on a variance
cell (DIFFUSION, MANIFESTVAR) under intoverpop = 'augmented' with a
full-rank population covariance (poprank = NA; the route's default
rank leaves out the directions its filter cannot see) is
partially identified: the population covariances it generates with the other
individually varying parameters are determined, while their decomposition
into a scale and correlations is a ridge. The printed summary distinguishes
the two cases, because the advice differs – fixing a value discards
information in the first case and is the fix in the second.
Requires the Julia backend, which is where the per-subject scores come from. The statistic has rank at most the number of subjects, so a model with more free parameters than subjects reports flat directions for that reason alone; the printed summary says when that applies.
How well the data determine each random effect's population standard
deviation, and how much of each subject's effect its own data determine
– the check ctFit makes at its estimate, stored as
fit$identifiability$effects – is taken here only at a supplied
inits, such as a fit's estimate$raw. It depends on the
population standard deviations, which only a fit estimates: at the
default evaluation points it describes the starting values rather than
the data, and there it read a well identified random drift as less
informed than one the data barely inform.
See also
ctFit runs the equivalent check on a finished fit,
evaluated at the estimate and stored as fit$identifiability.
Examples
# \donttest{
# ctIdentify() always uses the julia backend internally, whatever the
# eventual fit will use, so the example is inert where Julia is absent --
# including on CRAN, whose check machines have none.
if (isTRUE(ctJuliaStatus()$available)) {
gen <- suppressMessages(ctModel(type = 'ct', n.latent = 1, n.manifest = 1,
manifestNames = 'Y1', latentNames = 'eta1', LAMBDA = matrix(1),
DRIFT = matrix(-0.4), DIFFUSION = matrix(0.6), MANIFESTVAR = matrix(0.3),
T0VAR = matrix(1), T0MEANS = matrix(0), CINT = matrix(0),
MANIFESTMEANS = matrix(0), Tpoints = 8))
datalong <- ctGenerate(gen, n = 40, Tpoints = 8, backend = 'r')
model <- suppressMessages(ctModel(type = 'ct', n.latent = 1, n.manifest = 1,
manifestNames = 'Y1', latentNames = 'eta1', LAMBDA = matrix(1),
T0MEANS = matrix(0), CINT = matrix(0), MANIFESTMEANS = matrix(0)))
result <- ctIdentify(datalong, model, cores = 1)
print(result)
# Julia keeps running between calls, holding what it has compiled;
# this ends it.
ctJuliaKill("session")
}
# }