Page 1 of 1

MIDAS fit statistics (R², SSR, etc..) estimation sample if there's a gap

Posted: Wed Jun 24, 2026 11:37 am
by random_user
Hello,
Not a huge bug, but probably worth fixing.

EViews version: 14 (April 22 build)

When I use MIDAS, if I set the sample with a gap in the middle, for example 2010Q3–2026Q1 excluding 2020Q1 to 2022Q2 (pandemic), I noticed the R-squared can turn negative. In the regression I was testing, I was getting an R-squared of -0.507 for example... which makes no sense.

Estimation results:
Run A — sample 2010Q3-26Q1 excluding pandemic:
Included observations: 53 after adjustments
R-squared -0.507030 Mean dependent var 0.011627
Adjusted R-squared -0.987998 S.D. dependent var 0.106052
S.E. of regression 0.149530 Sum squared resid 1.050879
(C and 5 lag coefficients estimated on 53 obs)

Run B — full sample 2010Q3-2026Q1, no exclusions:
Included observations: 63 after adjustments
R-squared 0.660304 Mean dependent var 0.011627
Adjusted R-squared 0.630506 S.D. dependent var 0.106052
S.E. of regression 0.064465 Sum squared resid 0.236876

As you can see, the mean dependent variable (0.011627) and S.D. of dependent variable (0.106052) are identical in both runs. So, my pandemic period exclusion is being ignored when it comes to calculating these fit stats.

Similar, the SSR in Run A (1.0509) is clearly being summed over all 63 quarters, including the excluded ones, even though only 53 were used to fit the coefficients. And this is resulting in a negative R-squared.

Re: MIDAS fit statistics (R², SSR, etc..) estimation sample if there's a gap

Posted: Wed Jun 24, 2026 12:40 pm
by EViews Gareth
Yep, definitely a bug. We'll fix.

Just if you're interested, here's some code that makes it concrete.

Code: Select all

close @wf wfcreate(page=q) q 1990 2030 series y=nrnd pagecreate(page=m) m 1990 2030 series x=nrnd pageselect q copy(c=split) m\x * smpl 1990 2020 2023 2030 equation eq1.midas(midwgt=umidas, fixedlag=3) y c @ m\x equation eq2.ls y c x_3 x_2 x_1 show eq1 show eq2

Re: MIDAS fit statistics (R², SSR, etc..) estimation sample if there's a gap

Posted: Fri Jun 26, 2026 6:40 am
by random_user
thank you!
incidentally, wasn't aware of c=split, that's pretty useful.

Re: MIDAS fit statistics (R[emoji[emoji638][emoji639][emoji[emoji6[emoji640][emoji638]][emoji640][emoji6[emoji640][emoji

Posted: Fri Jun 26, 2026 7:21 am
by EViews Gareth
Great for umidas type stuff!