*! version 1.0.0 7jul2026

[ME] nnlme -- Nested Nonlinear Longitudinal Mixed-Effects regression

(View complete PDF manual entry)

Syntax

nnlme depvar
[if] [in]
[, surv(varlist) time(time_variable) id(grouping_variable) [shape(varlist)] options]

<nnlme> defines a program designed to implement a nested nonlinear regression following a standard exponentiated survival curve. When working correctly, the program isolates a latent curve along which there is an exogenous but unobserved acceleration in the negative direction in the rate of change over time. Because time is the main boundary defining parameter of interest, it is required for this analysis to be feasible.

Description

The model contained has the option to differentiate factors predicing the placement of the latent curve as well as shape parameters that help to improve the underlying model by accounting for exogeneous factors that might influence the pattern of mean change over time. The underlying distribution of the outcome is assumed to be multivariate normal, while the latent curve is assumed to be followed by an acceleration only in the negative direction.

The model is implemented using MENL so there are an array of general options that may work with this program including, for example, random effects specifications. Different covariance structures are provided to model random effects and to model heteroskedasticity and correlations within lowest-level groups.

See [ME] menl for other available features during estimation.

Implementation Notes

The ID variable cannot be a string.

Stored results

nnlme stores the following in e():

Scalars

e(N) number of observations

e(N_nonmiss) number of nonmissing depvar observations, if
tsmissing is specified

e(N_miss) number of missing depvar observations, if
tsmissing is specified

e(N_ic) number of nonmissing depvar observations to be
used for BIC computation when tsmissing is specified

e(k) number of parameters

e(k_f) number of fixed-effects parameters

e(k_r) number of random-effects parameters

e(k_rs) number of variances

e(k_rc) number of covariances

e(k_res) number of within-group error parameters

e(k_eq) number of equations

e(k_feq) number of fixed-effects equations

e(k_req) number of random-effects equations

e(k_reseq) number of within-group error equations

e(df_m) model degrees of freedom

e(df_c) degrees of freedom for comparison test

e(ll) linearization log (restricted) likelihood

e(ll_c) log likelihood, comparison model

e(chi2) chi-squared

e(chi2_c) chi-squared for comparison test

e(p) p-value for model test

e(p_c) p-value for comparison test

e(rank) rank of e(V)

e(rc) return code

e(converged) 1 if converged, 0 otherwise

Macros

e(cmd) menl

e(cmdline) command as typed

e(depvar) name of dependent variable

e(ivars) grouping variables

e(title) title in estimation output

e(varlist) variables used in the specified equation

e(key_N_ic) nonmissing obs, if tsmissing is
specified

e(tsmissing) tsmissing, if specified

e(tsorder) tsorder() specification

e(eq_depvar) user-specified equation

e(tsinit_depvar) tsinit() specification for
L.{depvar:}

e(expressions) names of defined expressions, expr_1,
expr_2, ..., expr_k

e(expr_expr_i) defined expression expr_i,
i=1, ..., k

e(tsinit_expr) tsinit() specification for
L.{expr:}

e(hierarchy) random-effects hierarchy structure,
(path:covtype:REs) (...)

e(revars) names of random effects

e(rstructlab) within-group error covariance output label

e(timevar) within-group error covariance t() variable, if
specified

e(indexvar) within-group error covariance index()
variable, if specified

e(covbyvar) within-group error covariance by() variable,
if specified

e(stratavar) within-group error variance strata()
variable, if specified

e(corrbyvar) within-group error correlation by() variable,
if specified

e(rescovopt) within-group error covariance option, if
rescovariance() specified

e(resvaropt) within-group error variance option, if
resvariance() specified

e(rescorropt) within-group error correlation option, if
rescorrelation() specified

e(groupvar) lowest-level group() variable, if
specified

e(chi2type) Wald; type of model chi-squared
test

e(vce) conventional

e(method) MLE or REML

e(opt) type of optimization, lbates

e(crittype) optimization criterion

e(properties) b V

e(estat_cmd) program used to implement estat

e(predict) program used to implement predict

e(marginsok) predictions allowed by margins

e(marginsnotok) predictions disallowed by margins

e(marginsdefault) default predict() specification for
margins

e(asbalanced) factor variables fvset as asbalanced

e(asobserved) factor variables fvset as asobserved

Matrices

e(b) coefficient vector

e(Cns) factor-variable constraint matrix

e(V) variance-covariance matrix of the estimators

e(V_modelbased) model-based variance

e(b_sd) random-effects and within-group error estimates in the
standard deviation metric

e(V_sd) VCE for parameters in the standard deviation
metric

e(b_var) random-effects and within-group error estimates in the
variance metric

e(V_var) VCE for parameters in the variance metric

e(cov_#) random-effects covariance structure
at the hierarchical level k - # + 1 in a k-level model

e(hierstats) group-size statistics for each hierarchy

Functions

e(sample) marks estimation sample