Test restrictions on coefficients of MIDAS regression
Test restrictions on coefficients of MIDAS regression
Perform a test whether the restriction on MIDAS regression coefficients holds.
hAh_test(x)
Arguments
x: MIDAS regression model with restricted coefficients, estimated with midas_r
Returns
a htest object
Details
Given MIDAS regression:
yt=j=0∑ki=0∑m−1θjm+ix(t−j)m−i+ut
test the null hypothesis that the following restriction holds:
θh=g(h,λ),
where h=0,...,(k+1)m.
Examples
##The parameter functiontheta_h0 <-function(p, dk,...){ i <-(1:dk-1)(p[1]+ p[2]*i)*exp(p[3]*i + p[4]*i^2)}##Generate coefficientstheta0 <- theta_h0(c(-0.1,0.1,-0.1,-0.001),4*12)##Plot the coefficientsplot(theta0)##Generate the predictor variableset.seed(13)xx <- ts(arima.sim(model = list(ar =0.6),600*12), frequency =12)##Simulate the response variabley <- midas_sim(500, xx, theta0)x <- window(xx, start=start(y))##Fit restricted modelmr <- midas_r(y~fmls(x,4*12-1,12,theta_h0)-1,list(y=y,x=x), start=list(x=c(-0.1,0.1,-0.1,-0.001)))##Perform test (the expected result should be the acceptance of null)hAh_test(mr)##Fit using gradient function##The gradient functiontheta_h0_gradient<-function(p, dk,...){ i <-(1:dk-1) a <- exp(p[3]*i + p[4]*i^2) cbind(a, a*i, a*i*(p[1]+p[2]*i), a*i^2*(p[1]+p[2]*i))}mr <- midas_r(y~fmls(x,4*12-1,12,theta_h0)-1,list(y=y,x=x), start=list(x=c(-0.1,0.1,-0.1,-0.001)), weight_gradients=list())##The test will use an user supplied gradient of weight function. See the##help of midas_r on how to supply the gradient.hAh_test(mr)
References
Kvedaras V., Zemlys, V. Testing the functional constraints on parameters in regressions with variables of different frequency Economics Letters 116 (2012) 250-254