*! version 1.0.0 20may2026 Dr Merwan Roudane (merwanroudane920@gmail.com)

Title

mixi01_vecm -- Mixed VECM for systems with I(1) and I(0) variables

Syntax

mixi01_vecm varlist [if] [in]
[,
options]

Model specification
lags(#) number of lags in the underlying VAR; default: lags(2)

rank(#) cointegration rank among I(1) variables; default: determined by Johansen test

i1(varlist) variables classified as I(1)

i0(varlist) variables classified as I(0)

Deterministic components
noconstant suppress constant

trend include restricted trend in cointegrating relations

utrend include unrestricted trend

Testing
trace report Johansen trace test for mixed system

maxeigen report maximum eigenvalue test

testi0 test for the presence of I(0) components (B31=0 restriction)

Reporting
level(#) confidence level; default: level(95)

alpha display loading (adjustment) matrix

beta display cointegrating vectors

detail display full model matrices

Description

mixi01_vecm estimates a vector error-correction model for a system
containing both I(1) and I(0) variables, following the methodology of Chen
(2022).

The standard VECM:

Delta Y_t = alpha beta' Y_ + sum_^

Pi_l Delta Y_ + U_t

requires that all components of Y_t are I(1). When some components are I(0),
the model must be reformulated. Chen (2022) shows that a VECM with k
I(0) components among n variables is equivalent to a standard VECM with
additional "pseudo" cointegrating vectors.

Key idea (Lemma 2.5, Chen 2022): The condition B31 = 0 in the
transformation matrix B between the observed variables Y_t and the underlying
process (Delta Z_t, X_t)' is both necessary and sufficient for k components
of Y_t to be I(0). This condition translates into testable restrictions on
the cointegration space.

Specifically, if Y_t contains r true cointegrating relations among the
n_1 = n − k I(1) variables, plus k pseudo cointegrating relations from the
I(0) variables, the total cointegration rank for the Johansen procedure is
h = r + k. The pseudo cointegrating vectors take the form:

beta_tilde = (beta_1', 0 \ beta_2', 0 \ 0, I_k)

where beta_1 and beta_2 are the true cointegrating coefficients among
the I(1) variables, and I_k is the identity identifying the I(0)
variables as "cointegrating with themselves."

Options

Model specification

lags(#) specifies the lag order of the underlying VAR in levels. The
VECM has p−1 lags of Delta Y_t.

rank(#) specifies the true cointegration rank r among the I(1)
variables. The total rank used in estimation is r + k, where k is the number
of I(0) variables. If omitted, the Johansen trace test is used to determine r.

i1(varlist) specifies I(1) variables.

i0(varlist) specifies I(0) variables. Each variable listed here
contributes one pseudo cointegrating vector.

Testing

trace displays the Johansen trace test adapted for the mixed system.
The total number of cointegrating relations being tested is r + k.

maxeigen displays the maximum eigenvalue test.

testi0 tests the restriction B31 = 0 from Lemma 2.5 of Chen (2022).
This is a likelihood-ratio test for the presence of I(0) components in the
system. Under the null that all variables are I(1), the I(0) restriction
is not binding.

Reporting

alpha displays the (n × h) loading matrix alpha_tilde, partitioned
into loadings on true and pseudo cointegrating relations.

beta displays the (n × h) cointegrating matrix beta_tilde.

detail displays the full VECM matrices including the short-run
dynamics Pi_l.

Remarks

Connection to underlying VAR. Chen (2022, Lemma 2.4) establishes that
any cointegrated VECM has an "underlying process" (Delta Z_t, X_t)' that is a
stationary VAR. Conversely, any stationary VAR with r components designated
as Delta Z_t and h = n − r components as X_t generates a VECM with r unit
roots and h cointegrating relations through the transformation Y_t = B (Z_t', X_t')'.

When B31 = 0, the last k components of Y_t depend only on X_t (the stationary
part), making them I(0). This provides the constructive principle for
building mixed VECMs.

Estimation. The Johansen ML procedure is applied to the full system
with total cointegration rank h = r + k. The I(0) variables contribute
pseudo cointegrating vectors with known structure (identity on the I(0)
variable, zero elsewhere). These known vectors can be imposed as restrictions
in the beta matrix during estimation.

Testing for I(0) components. The testi0 option implements
a likelihood-ratio test comparing:

H0: All n variables are I(1) with cointegration rank h.

H1: k variables are I(0), with cointegration rank r among the remaining
I(1) variables and total rank r + k.

The test statistic is asymptotically chi-squared under H0.

Examples

Example 1: Hamilton (1994)-style system

System with 3 I(1) variables (one cointegrating relation) and 1 I(0) variable.

. mixi01_vecm y1 y2 y3 y4, lags(2) i1(y1 y2 y3) i0(y4) rank(1) trace

Example 2: Automatic rank determination

. mixi01_vecm gdp cpi m2 irate, lags(4) i1(gdp cpi m2) i0(irate) trace maxeigen

Example 3: Test for I(0) components

. mixi01_vecm y1 y2 y3 y4, lags(2) rank(1) testi0

Example 4: Display all matrices

. mixi01_vecm y1 y2 y3 y4, lags(2) i1(y1 y2 y3) i0(y4) rank(1) alpha beta detail

Stored results

mixi01_vecm stores the following in e():

Scalars

e(N) number of observations

e(k_eq) number of equations

e(lags) lag order of underlying VAR

e(rank) true cointegration rank r

e(rank_total) total rank h = r + k

e(k_i1) number of I(1) variables

e(k_i0) number of I(0) variables

e(ll) log-likelihood

e(lr_testi0) LR statistic for I(0) test (if testi0)

e(p_testi0) p-value for I(0) test

Macros

e(cmd) mixi01_vecm

e(depvar) list of endogenous variables

e(i1vars) I(1) variables

e(i0vars) I(0) variables

Matrices

e(b) stacked VECM coefficient vector

e(V) variance–covariance matrix

e(alpha) n × h loading matrix

e(beta) n × h cointegrating matrix

e(Pi) n × n long-run matrix alpha*beta'

e(Gamma) short-run coefficient matrices

e(Sigma) n × n error covariance

e(eigenvalues) Johansen eigenvalues

e(trace_stat) trace test statistics

e(trace_cv) trace test critical values

Functions

e(sample) marks estimation sample

References

Chen, P. (2022). Vector error correction models with stationary and
nonstationary variables. SSRN Working Paper No. 4218834.

Hamilton, J. D. (1994). Time Series Analysis. Princeton University Press.

Johansen, S. (1995). Likelihood-Based Inference in Cointegrated Vector
Autoregressive Models. Oxford University Press.

Lütkepohl, H. (2006). New Introduction to Multiple Time Series
Analysis. Berlin: Springer.

Author

Dr Merwan Roudane

Department of Economics (Independent Researcher)

merwanroudane920@gmail.com

Also see

Master help — mixi01.

Sibling commands — mixi01_fmols, mixi01_fmvar,
mixi01_fmiv, mixi01_acl, mixi01_svar,
mixi01_vecm, mixi01_irf, mixi01_test.