This release note reflects a direct comparison between the current
package and package_v0.3/nlpsem.
getPosterior() entropy
calculation when nClass = 1.getTVCmodel()
documentation for Jenss-Bayley curve function.memebership → membership in
getSummary().class column in
getPosterior() when label = TRUE.model NULL validation in
getEstimateStats() for likelihood, bootstrap, and combined
CIs.any() logic error in
validate_res_scale().[[]] list indexing on numeric vector in
getMULTI.initial().TVC.initial_helper.R.getFigure(): Mediation sub-model loop iterated
over y_var (always length 1) instead of
traj_var, and outcome was not indexed — only
the first trajectory was plotted.TVC.initial_helper.R: Hardcoded
t_var = "T" replaced with the actual t_var
function parameter when computing TVC initial values.MED.output_helper.R: Swapped y_var/m_var standard
error order in 3 output blocks (BLS baseline, LIN longitudinal, BLS
longitudinal) so SEs match their corresponding estimates.MED.mxModel_helper.R: Removed quoted strings from
mxAlgebra() calls in 4 places. mxAlgebra()
uses non-standard evaluation (bare names); quoted strings are for
mxAlgebraFromString().TVC.output_helper.R,
MIX.output_helper.R (2 places), and
MGroup.output_helper.R (2 places): Loop assumed consecutive
records starting at 1; replaced with seq_along() for
correct indexing with arbitrary record indices.getPosterior(): Protected entropy calculation
from log(0) using
pmax(prob, .Machine$double.xmin).getLatentKappa(): Added defensive guard for kappa
edge cases (kappa >= 1 or <= 0).getSummary(): Empty latent classes in mixture
models now handled correctly using
factor(membership, levels = 1:nClass) to ensure proportions
vector matches nClass.validate_res_scale(): List branch now uses
<= 0 / >= 1 to match non-list branch
(both enforce exclusive bounds as documented).MIX.initial_helper.R: TVC residual
(TVC_starts$residuals) now also inflated by 2× when
decompose != 0, matching the Y residual inflation for
mixture model convergence.MULTI.initial_helper.R: Residual covariance
matrix off-diagonal indexing used
res_cor[traj_i + traj_j - 1] which produced wrong indices
for 4+ longitudinal outcomes. Replaced with sequential counter to
correctly map pair (i,j) to res_cor vector position.TVC.initial_helper.R: Added
res_cor = NULL default to getTVC.initial()
signature. Callers in MIX.initial_helper.R and
MGroup.initial_helper.R omit res_cor when
decompose = 0 (where it is unused), but the missing default
could cause errors if the function is refactored.getMGM() / getMULTI.initial():
Multivariate models now preserve the full y_var prefixes
provided by the user instead of collapsing them to single-letter
uppercase prefixes.MGM.output_helper.R,
MGroup.output_helper.R, and
MIX.output_helper.R: between-process covariance output for
3+ outcomes/classes no longer appends cumulative estimate blocks or
corrupts paramOut tables.MGM.mxModel_helper.R,
MGroup.SUBMODEL.MGM_helper.R, and
MIX.SUBMODEL.MGM_helper.R: Fixed-parameter multivariate
covariance extraction now works for 3+ outcomes instead of assuming
exactly 2 longitudinal processes.MED.Initial_helper.R: In longitudinal-predictor
mediation models, the initial beta_x and
beta_m blocks are no longer swapped in the outcome
regression starts.TVC.initial_helper.R: decompose = 3
now computes kappa starts from the change-from-baseline
temporal state implied by the latent growth-factor starts, and the
nonparametric path now returns finite starts instead of falling through
to NA.MIX.output_helper.R: Cluster-TIC coefficient
names now scale to any number of predictors instead of hard-coding a
3-column naming pattern.I() wrappers from logical
conditions across 11 files.validation_helpers.R).getPosterior() using
sweep()/rowSums().starts[[1]][[2]])
to named access (starts$Y_starts$covMatrix) across all
helper files for maintainability.as.data.frame(dat) guard in all main functions
for tibble compatibility.validate_res_cor() helper and validation calls in
getTVCmodel(), getMGM(),
getMediation(), getMIX(), and
getMGroup().validate_curveFun_mediation()
function (logic already in validate_sub_Model()).getFigure() by removing
redundant is.null(nClass) / !is.null(nClass)
branching.else if conditions in
StandardMethods.R.getUNI.GF() now computes per-person mean squared residuals
from individual model fits and returns the median as an attribute. All
initial value helpers (UNI.initial_helper.R,
MULTI.initial_helper.R, TVC.initial_helper.R,
MED.Initial_helper.R) now use this data-driven estimate
instead of the var() * res_scale heuristic, with the
heuristic retained as a fallback. This provides more accurate starting
values, especially for nonlinear functional forms (EXP, JB, BLS) where
the heuristic could be orders of magnitude off.getEstimateStats() into local helpers
(.add_wald_CI(), .get_likelihood_CI(),
.get_bootstrap_CI()).&/| to
&&/|| in
validation_helpers.R (7 places) and
getFigure.R (3 places) for proper short-circuit
evaluation.MIX.initial_helper.R (duplicate
order_indices assignment).global_vars.R for bare names used in
mxAlgebra() calls.res_scale is now optional: With
data-driven residual estimation, users no longer need to specify
res_scale. When omitted (default NULL), the
data-driven estimate is used; if that fails, a fallback heuristic of
var() * 0.1 is applied. Users can still override with an
explicit res_scale value if desired.res_cor is now optional: Residual
correlation between longitudinal outcomes is now estimated from data
when res_cor is not specified. The estimation uses
within-person demeaned residuals correlated across trajectory pairs. If
estimation fails, a heuristic of 0.3 is applied as
fallback. This applies to getMGM(),
getMediation(), getTVCmodel() (when
decompose != 0), getMIX(), and
getMGroup(). Users can still override with explicit
res_cor values if desired.paramOut = TRUE, the names argument is now
optional. If omitted (default NULL), meaningful parameter
names are automatically generated based on the model configuration
(functional form, intrinsic flag, covariates, decompose level, etc.).
This eliminates the need for users to manually construct long parameter
name vectors for every model. Users can still supply custom names to
override the auto-generated labels. Auto-naming is supported across all
7 model functions: getLGCM(), getLCSM(),
getTVCmodel(), getMediation(),
getMGM(), getMIX(), and
getMGroup(). A safety net in all output helpers auto-pads
with generic labels if the name count doesn’t match the estimate
count.initial_helpers_common.R, added reusable validation helpers
in validation_helpers.R, and introduced shared helpers for
output naming and multivariate covariance reduction in
output_helpers_common.R and
multi_cov_helpers.R.@seealso cross-references linking related
functions across all 14 exported functions.@noRd to all 44 internal helper files to suppress
unnecessary .Rd generation.nlpsem_overview) with
package overview and quick-start guide.getMGroup_examples vignette with a second
example (quadratic LGCM with TICs).global_vars.R.NEWS.md changelog.\examples{} sections to ModelSummary
and printTable S4 generics.$95\%$) to plain text in
KappaOutput class documentation.LGCM.mxModel_helper.R.getEstimateStats.R roxygen.getLatentKappa.R example.validation_helpers.R.getMIX.R and
getMGroup.R (said “latent change score model” instead of
“mixture model” / “multiple group model”).inst/extdata.DESCRIPTION
(knitr, rmarkdown, and
VignetteBuilder) and added the introductory
nlpsem_overview vignette.tests/testthat suite covering validation
helpers, automatic parameter naming, nonlinear growth-factor starts,
mediation starts, and multivariate regression cases.inst/extdata/*.RData and aligned the vignettes with those
regenerated examples.getLGCM()) and
latent change score models (getLCSM()), with optional
time-invariant covariates (TICs).getTVCmodel()).getMGM()) and
longitudinal mediation models (getMediation()).getMGroup()) for comparing
trajectories across manifested groups.getMIX()) for identifying
latent trajectory classes.getSummary(): Model fit statistics (number of
parameters, -2LL, AIC, BIC).getEstimateStats(): P-values and confidence intervals
(Wald, likelihood-based, and bootstrap).getFigure(): Visualization of estimated growth
trajectories with confidence intervals.getLRT(): Likelihood ratio test for nested model
comparison.getIndFS(): Individual factor scores.getPosterior(): Posterior class probabilities for
mixture models.getLatentKappa(): Cohen’s kappa for latent class
agreement.RMS_dat, a processed sample from the
ECLS-K:2011 study for demonstration purposes.