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

Title

mixi01_fmols -- Fully Modified OLS for mixed I(1)/I(0) regressions

Syntax

mixi01_fmols depvar indepvars [if] [in]
[,
options]

Integration classification
i1(varlist) variables classified as I(1); default: all indepvars

i0(varlist) variables classified as I(0)

Long-run covariance estimation
kernel(string) kernel function; bartlett, parzen,
tukeyhanning, or qs (quadratic spectral); default: bartlett

bw(#|auto) bandwidth (lag truncation) parameter; auto
selects the Andrews (1991) data-driven bandwidth; default: auto

prewhiten apply VAR(1) prewhitening before kernel estimation

Deterministic components
noconstant suppress the constant term

trend include a linear time trend

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

detail display detailed long-run covariance estimates

Description

mixi01_fmols estimates the regression

y_t = A x_t + u_0t

using the Fully Modified OLS (FM-OLS) procedure of Phillips and Hansen (1990)
as generalized in Phillips (1995, Sections 3–4) to accommodate regressors
x_t that may contain both I(1) and I(0) components, possibly with
unknown cointegrating linkages among them.

The FM-OLS estimator modifies ordinary least squares by applying two
semiparametric corrections:

Endogeneity correction. The dependent variable y_t is transformed to
y_t^+ = y_t − Omega_0x Omega_xx^{−1} Δx_t
using kernel estimates of the long-run covariance between the equation error and
the differenced regressors. This removes second-order bias caused by feedback
from any cointegrating relationship.

Serial correlation correction. A one-sided long-run covariance term
Delta^+_0x is subtracted to remove the effects of serial covariance
between the equation error and past history of the regressor innovations.

Together these corrections yield the FM-OLS estimator:

A^+ = (Y^{+′}X − T Delta^+_0x) (X′X)^{−1}

Key result (Phillips, 1995, Theorem 4.1):

(a) In the stationary directions (H_1), sqrt(T)(A^+ − A)
converges to a normal distribution, identical to OLS under correct
specification.

(b) In the nonstationary directions (H_2), T(A^+ − A)
converges to a mixed-normal (Brownian motion) functional, symmetric and
median-unbiased, free of nuisance parameters.

These results hold without prior knowledge of which regressors are I(1)
versus I(0), without pretesting, and without knowing the dimension of the
cointegration space among the regressors. The user may optionally supply
i1() and i0() classifications for sharper inference and for
compatibility with mixi01_test, but they are not required for
consistent estimation.

Options

Integration classification

i1(varlist) specifies which independent variables are believed to be
I(1). If neither i1() nor i0() is specified, all independent
variables are treated as possibly nonstationary and the full FM correction is
applied. The FM-OLS estimator remains consistent either way (Phillips, 1995,
Remark 4.4(e)), but explicit classification enables sharper Wald tests via
mixi01_test.

i0(varlist) specifies which independent variables are believed to be
I(0).

Long-run covariance estimation

kernel(string) selects the kernel function used to estimate the long-run
covariance matrix Omega and the one-sided long-run covariance Delta.
Choices are:

bartlett — the Bartlett (triangular) kernel with truncation at lag K.
This satisfies Assumption KL in Phillips (1995).

parzen — the Parzen kernel, which is twice continuously differentiable
with characteristic exponent r = 2.

tukeyhanning — the Tukey–Hanning kernel (cosine window). Note: this
kernel can produce negative spectral estimates.

qs — the quadratic spectral (Bartlett–Priestley) kernel of Priestley
(1981, p. 463), which is non-truncated and positive semidefinite.

bw(#|auto) sets the bandwidth parameter K in the kernel estimates.
Under the theory of Phillips (1995, Assumption BW), K should grow at rate
T^k for k in (1/4, 2/3). If auto is specified, the Andrews (1991)
plug-in procedure is used to choose K automatically.

prewhiten applies a VAR(1) filter to the residual vector before kernel
estimation, recoloring afterwards. This often improves finite-sample
performance of the long-run covariance estimates.

Deterministic components

noconstant suppresses the constant from the regression equation.

trend includes a linear time trend among the regressors. See Phillips
(1995, Section 4.7) for the extension to models with deterministic regressors.

Reporting

level(#) sets the confidence level for reported confidence intervals.

detail displays the estimated long-run covariance matrix Omega_hat,
the one-sided covariance Delta_hat, and the correction terms.

Remarks

I(1) versus I(0) classification. A central message of Phillips (1995)
is that the researcher need not know the integration properties of the
regressors in advance. The FM corrections are applied as if all regressors
were I(1); for any I(0) components, the corrections are asymptotically
negligible. Hence mixi01_fmols produces valid estimates and standard
errors whether the user's classification is right, wrong, or simply omitted.

Bandwidth choice. Under Assumption BW(i), the bandwidth K must satisfy
K = O_e(T^k) for k in (1/4, 2/3). The Andrews (1991) rule typically
produces bandwidths in this range for moderate to large T. For small
samples, manual specification via bw(#) is recommended.

Wald tests. After mixi01_fmols, use mixi01_test to
perform Wald tests. By Theorem 4.5, the Wald statistic has a limit
distribution that is a mixture of chi-squared variates, bounded above by
chi-squared(q). The conservative test uses chi-squared(q) critical values;
the liberal test uses Omega_00.2 in the variance metric (Remark 4.6(b)).

Examples

Example 1: Basic FM-OLS with automatic bandwidth

Setup: regress log GDP on log investment (I(1)) and interest rate (I(0)).

. webuse lutkepohl2, clear

. tsset qtr

. mixi01_fmols ln_consump ln_inv ln_inc, i1(ln_inv ln_inc) kernel(bartlett) bw(auto)

Example 2: Mixed I(1)/I(0) with explicit classification

. sysuse auto, clear

. * Simulated time series example:

. clear

. set obs 200

. set seed 12345

. gen t = _n

. tsset t

. gen e1 = rnormal()

. gen e2 = rnormal()

. gen e3 = rnormal()

. gen x1 = sum(e1)

. gen x2 = sum(e2)

. gen x3 = 0.8*L.x3 + e3 if t>1

. replace x3 = e3 if t==1

. gen y = 2*x1 + 1.5*x2 + 0.5*x3 + rnormal()

. mixi01_fmols y x1 x2 x3, i1(x1 x2) i0(x3) kernel(parzen) bw(6)

Example 3: With time trend and prewhitening

. mixi01_fmols y x1 x2 x3, i1(x1 x2) i0(x3) trend prewhiten kernel(qs) bw(auto) detail

Example 4: Followed by Wald test

. mixi01_fmols y x1 x2 x3, i1(x1 x2) i0(x3)

. mixi01_test, wald("x2=0, x3=0") conservative

Stored results

mixi01_fmols stores the following in e():

Scalars

e(N) number of observations

e(k) number of regressors (including constant/trend)

e(k_i1) number of I(1) regressors

e(k_i0) number of I(0) regressors

e(bw) bandwidth (lag truncation) used

e(rank) rank of long-run covariance Omega_xx

e(ll) log-likelihood (under Gaussian errors)

e(rss) residual sum of squares (from FM regression)

Macros

e(cmd) mixi01_fmols

e(depvar) name of dependent variable

e(indepvars) names of independent variables

e(i1vars) names of I(1) variables

e(i0vars) names of I(0) variables

e(kernel) kernel function used

e(properties) b V

Matrices

e(b) 1 × k coefficient vector

e(V) k × k variance–covariance matrix (using Sigma_00 metric)

e(V_liberal) k × k variance–covariance matrix (using Omega_00.2 metric)

e(Omega) (n+m) × (n+m) long-run covariance matrix

e(Delta) one-sided long-run covariance matrix

e(Sigma_uu) error covariance matrix Sigma_00

e(Omega_002) conditional long-run variance Omega_{00.2}

e(b_ols) OLS coefficient vector (for comparison)

Functions

e(sample) marks estimation sample

References

Andrews, D. W. K. (1991). Heteroskedasticity and autocorrelation consistent
covariance matrix estimation. Econometrica, 59(3), 817–858.

Phillips, P. C. B. (1995). Fully modified least squares and vector
autoregression. Econometrica, 63(5), 1023–1078.

Phillips, P. C. B. and B. E. Hansen (1990). Statistical inference in
instrumental variables regression with I(1) processes.
Review of Economic Studies, 57(1), 99–125.

Priestley, M. B. (1981). Spectral Analysis and Time Series.
London: Academic Press.

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.