Thank you for your great contribution.
Yet I have a question concerning calculating F-statistic,
the parameters for numerator and denominator as at the end of the function
are y_lag and x_lag+y_lag+1.
I read in Wikipedia which says "the simple linear model y = mx + b has p=2 ", if Wikipedia
is right, then the parameters should be "y_lag+1 and x_lag+y_lag+2"
could you please explain this in a simple way? I am quite confused.