fa.sglfit: Estimates factor-augmented sparse MIDAS regression model

View source: R/fa.sglfit.R

fa.sglfitR Documentation

Estimates factor-augmented sparse MIDAS regression model

Description

Estimates factor-augmented sparse MIDAS regression model

The function first computes factors on MIDAS-weighted regressors x. Then the function runs cv.sglfit to fit the model. The output can be passed to predict.fa.sglfit to obtain predictions.

Usage

fa.sglfit(x, y, f = NULL, K = NULL, gamma = 1.0, gindex = 1:nvars, 
  ...)

Arguments

x

T by p data matrix, where T and p respectively denote the sample size and the number of regressors.

y

T by 1 response variable.

f

T by K latent factors. If null, the factors are estimated by using Principal Component Analysis (PCA). In this case, the number of optimal factors is selected by appyling eigenvalue ratio estimator of Ahn and Horenstein (2013).

K

number of factors. If f is not provided, the number of factors is estimated by applying eigenvalue ratio estimator of Ahn and Horenstein (2013) in case K=NULL. Else, first K Principal Components are used.

gamma

sg-LASSO mixing parameter. γ = 1 gives LASSO solution and γ = 0 gives group LASSO solution.

gindex

p by 1 vector indicating group membership of each covariate.

...

Other arguments that can be passed to cv.sglfit.

Details

The factor-augmented sparse MIDAS regression is estimated by applying a sg-LASSO penalty on sparse component. The sequence of linear regression models implied by λ vector is fit by block coordinate-descent. The objective function is

||y - ια - fφ - xβ||2T + 2λ Ωγ(β),
where ι∈RTenter> and ||u||2T=<u,u>/T is the empirical inner product. The penalty function Ωγ(.) is applied on β coefficients and is

Ωγ(β) = γ |β|1 + (1-γ)|β|2,1,
a convex combination of LASSO and group LASSO penalty functions.

Value

fa.sglfit object.

Examples

set.seed(1)
x = matrix(rnorm(100 * 20), 100, 20)
beta = c(5,4,3,2,1,rep(0, times = 15))
f = matrix(rnorm(100 * 2), 100, 2)
g = c(0.5, 0.5)
y = x%*%beta + f%*%g + rnorm(100)
gindex = sort(rep(1:4,times=5))
fa.sglfit(x = x, y = y, f = f, gindex = gindex, gamma = 0.5,  
           standardize = FALSE, intercept = FALSE)

midasml documentation built on Nov. 5, 2025, 5:44 p.m.