Hello all, I am newbie to R and have not been able to find too much stuff on a version of VAR(p) I am working on. Would someone be able to tell me if there is a more elegant way of writing A function for the following? Many thanks in advance. Darius I am regressing returns of 8 asset classes on lagged values of 4 state variables and so I have 8 equations like the following: cash_lag1= dynlm (cal_cash ~ lag(cal_ism,-1) +lag(cal_per,-1) +lag(cal_spread,-1) +lag(cal_unemp,-1)) Is there a way to write pack the 8 regressions in one function? I have already tried ts.union to join the 8 returns into one vector and also as a data frame but I get error messages. [[alternative HTML version deleted]]
Hi all, does anyone know of a function that would calculate AIC or AICc for a system of equations. I have several systems and I have individual AIC values but I need a global one to assess amongst several systems of equations. The systems are very similar to, but not exactly like VAR groups of equations. I have the printout from one of the systems below. Many thanks in advance, Darius.> selMod(calibresult1, Order = "AICc")model LL K N2K AIC 1 ism1 + per1 + spread1 + unemp1 70.69719 6 19.83333 -129.39438 7 ism1 + per1 + spread1 + unemp1 -28.42095 6 19.83333 68.84191 5 ism1 + per1 + spread1 + unemp1 -31.00702 6 19.83333 74.01404 6 ism1 + per1 + spread1 + unemp1 -31.69314 6 19.83333 75.38629 4 ism1 + per1 + spread1 + unemp1 -35.55851 6 19.83333 83.11702 2 ism1 + per1 + spread1 + unemp1 -49.64393 6 19.83333 111.28787 3 ism1 + per1 + spread1 + unemp1 -52.75274 6 19.83333 117.50547 8 ism1 + per1 + spread1 + unemp1 -56.14871 6 19.83333 124.29742 deltAIC w_i AICc deltAICc w_ic 1 0.0000 1 -128.64438 0.0000 1 7 198.2363 0 69.59191 198.2363 0 5 203.4084 0 74.76404 203.4084 0 6 204.7807 0 76.13629 204.7807 0 4 212.5114 0 83.86702 212.5114 0 2 240.6822 0 112.03787 240.6822 0 3 246.8999 0 118.25547 246.8999 0 8 253.6918 0 125.04742 253.6918 0 [[alternative HTML version deleted]]