Whether the groupings in your data arise in a nested fashion (students nested in schools and schools nested in districts) or in a nonnested fashion (regions crossed with occupations), you can fit a multilevel model to account for the lack of independence within these groups. Fit models for continuous, binary, count, ordinal, and survival outcomes. Estimate variances of random intercepts and random coefficients. Compute intraclass correlations. Predict random effects. Estimate relationships that are population averaged over the random effects. And much more.


OUTCOMES AND REGRESSION ESTIMATORS

  • Continuous, modeled as
    • Linear
    • Log linear
    • Log gamma
    • Nonlinear
    • Interval-measured (interval-censored)
    • Left-censored, right-censored, or both (tobit)
  • Binary outcomes, modeled as
    • Logistic
    • Probit
    • Complementary log-log
  • Count outcomes, modeled as
    • Poisson
    • Negative binomial
  • Categorical outcomes, modeled as
    • Multinomial logistic
      (via generalized SEM)
  • Ordered outcomes, modeled as
    • Ordered logistic
    • Ordered probit
  • Survival outcomes, modeled as
    • Exponential
    • Weibull
    • Lognormal
    • Loglogistic
    • Gamma
  • Generalized linear models (GLMs)
    • Seven families: Gaussian, Bernoulli, binomial, gamma, negative binomial, ordinal, Poisson
    • Five links: identity, log, logit, probit, cloglog

 

TYPES OF MODELS

  • Two-, three-, and higher-level models
  • Nested (hierarchical) models
  • Crossed models
  • Mixed models
  • Balanced and unbalanced designs

TYPES OF EFFECTS

  • Random intercepts
  • Random coefficients (slopes)
  • Variances of random effects (variance components)
  • Fixed effects (regression coefficients)

EFFECT COVARIANCE STRUCTURES

  • Identity—shared variance parameter for specified effects with no covariances
  • Independent—unique variance parameter for each specified effect with no covariances
  • Exchangeable—shared variance parameter and single shared covariance parameter for specified effects
  • Unstructured—unique variance parameter for each specified effect and unique covariance parameter for each pair of effects
  • Compound—any combination of the above

ERROR (RESIDUAL) STRUCTURES FOR LINEAR MODELS

  • Independent
  • Exchangeable
  • Autoregressive
  • Moving average
  • Exponential
  • Banded
  • Toeplitz
  • Flexible
  • Unstructured

ESTIMATION METHODS

  • Maximum likelihood (ML)
  • Restricted maximum likelihood (REML)
  • Mean-variance or mode-curvature adaptive Gauss–Hermite quadrature
  • Nonadaptive Gauss–Hermite quadrature
  • Laplacian approximation
  • EM method starting values

SMALL-SAMPLE INFERENCE IN LINEAR MODELS (DDF ADJUSTMENTS) 

  • Kenward–Roger
  • Satterthwaite
  • ANOVA
  • Repeated-measures ANOVA
  • Residual
© Copyright 1996–2024 StataCorp LLC. All rights reserved.

BAYESIAN ESTIMATION

  • Select from many prior distributions or use default priors
  • Adaptive MH sampling or Gibbs sampling with linear regression
  • Postestimation tools for checking convergence, estimating functions of model parameters, computing Bayes factors, and performing interval hypotheses testing
  • Nonlinear
  • Multivariate

CONSTRAINTS

  • Linear constraints on fixed parameters
  • Linear constraints on variance components

SURVEY DATA FOR LINEAR MODELS

  • Sampling weights
  • Weights at each level of model
  • Cluster–robust SEs allowing for correlated data

SURVEY DATA FOR GENERALIZED LINEAR AND SURVIVAL MODELS

  • Sampling weights
  • Weights at each level of model
  • Cluster–robust SEs allowing for correlated data
  • Support the –svy– prefix for linearized variance estimation including stratification and multistage weights

 

Multiple imputation

 

POSTESTIMATION SELECTOR

  • View and run all postestimation features for your command
  • Automatically updated as estimation commands are run

 

ESTIMATES OF RANDOM EFFECTS

  • BLUPs for linear models
  • Standard errors of BLUPs for linear models
  • Empirical Bayes posterior means or posterior modes
  • Standard errors of posterior modes or means

PREDICTIONS

  • Predicted outcomes with and without effects
    • Linear predictions
    • Probabilities
    • Counts
    • Density function
    • Distribution function
    • Survivor function
    • Hazard function
    • Predict marginally with respect to random effects
    • Pearson, deviance, and Anscombe residuals

OTHER POSTESTIMATION ANALYSIS

  • Estimate variance components
  • Intraclass correlation coefficients (ICCs) after logistic, probit, and random-effects models
  • Linear and nonlinear combinations of coefficients with SEs and CIs
  • Wald tests of linear and nonlinear constraints
  • Likelihood-ratio tests
  • Linear and nonlinear predictions
  • Summarize the composition of nested groups
  • Adjusted predictions
  • AIC and BIC information criteria
  • Hausman tests

FACTOR VARIABLES

  • Automatically create indicators based on categorical variables
  • Form interactions among discrete and continuous variables
  • Include polynomial terms
  • Perform contrasts of categories/levels
Watch Introduction to Factor Variables in Stata tutorials

MARGINAL ANALYSIS

  • Estimated marginal means
  • Marginal and partial effects
  • Average marginal and partial effects
  • Least-squares means
  • Predictive margins
  • Adjusted predictions, means, and effects
  • Works with multiple outcomes simultaneously
  • Integrates over random effects
  • Contrasts of margins
  • Pairwise comparisons of margins
  • Profile plots
  • Graphs of margins and marginal effects