ctmaAllInvFit function

ctmaAllInvFit

ctmaAllInvFit

Fit a CoTiMA model with all params (drift, T0var, diffusion) invariant across primary studies

ctmaAllInvFit( ctmaInitFit = NULL, activeDirectory = NULL, activateRPB = FALSE, digits = 4, drift = drift, coresToUse = c(1), n.manifest = 0, indVarying = FALSE, scaleTime = NULL, optimize = TRUE, priors = FALSE, finishsamples = NULL, iter = NULL, chains = NULL, verbose = NULL, loadAllInvFit = c(), saveAllInvFit = c(), silentOverwrite = FALSE, customPar = FALSE, T0means = 0, manifestMeans = 0, CoTiMAStanctArgs = NULL, lambda = NULL, manifestVars = NULL, indVaryingT0 = NULL )

Arguments

  • ctmaInitFit: ctmaInitFit
  • activeDirectory: activeDirectory
  • activateRPB: activateRPB
  • digits: digits
  • drift: Labels for drift effects. Have to be either of the type V1toV2 or 0 for effects to be excluded, which is usually not recommended)
  • coresToUse: coresToUse
  • n.manifest: Number of manifest variables of the model (if left empty it will assumed to be identical with n.latent).
  • indVarying: Allows ct intercepts to vary at the individual level (random effects model, accounts for unobserved heterogeneity)
  • scaleTime: scaleTime
  • optimize: optimize
  • priors: priors (FALSE)
  • finishsamples: finishsamples
  • iter: iter
  • chains: chains
  • verbose: verbose
  • loadAllInvFit: loadAllInvFit
  • saveAllInvFit: saveAllInvFit
  • silentOverwrite: silentOverwrite
  • customPar: logical. If set TRUE (default) leverages the first pass using priors and ensure that the drift diagonal cannot easily go too negative (helps since ctsem > 3.4)
  • T0means: Default 0 (assuming standardized variables). Can be assigned labels to estimate them freely.
  • manifestMeans: Default 0 (assuming standardized variables). Can be assigned labels to estimate them freely.
  • CoTiMAStanctArgs: parameters that can be set to improve model fitting of the ctStanFit Function
  • lambda: R-type matrix with pattern of fixed (=1) or free (any string) loadings.
  • manifestVars: define the error variances of the manifests with a single time point using R-type lower triangular matrix with nrow=n.manifest & ncol=n.manifest.
  • indVaryingT0: Forces T0MEANS (T0 scores) to vary interindividually, which undos the nesting of T0(co-)variances in primary studies (default = TRUE). Was standard until Aug. 2022. Could provide better/worse estimates if set to FALSE.

Returns

returns a fitted CoTiMA object, in which all drift parameters, Time 0 variances and covariances, and diffusion parameters were set invariant across primary studies