0
$\begingroup$

I have been looking at several of the timeseries functions in mathematica, however running a process like ARDL, ARMA, GARCH or ARCH you would be able to get a ANOVA table, with its coefficients and p value, you also in most packages would get R and R^2.

I am wondering if there is an easy way to get ANOVA table when running an ARDL model or a ARCH model. I know it is possible with linear model fit, but I am not able to get it when using any other models.

$\endgroup$
4
$\begingroup$

Yes, there is a way. We will illustrate this using the following example.

data = Table[{3 + i + RandomReal[{-3, 7}], i + RandomReal[{-2, 5}]}, {i, 1, 20}];

model = LinearModelFit[data, x, x]

(* ANOVA table *)
model["ANOVATable"]

$\begin{array}{l|lllll} \text{} & \text{DF} & \text{SS} & \text{MS} & \text{F-Statistic} & \text{P-Value} \\ \hline x & 1 & 585.43 & 585.43 & 55.8679 & \text{6.360782869783599$\grave{ }$*${}^{\wedge}$-7} \\ \text{Error} & 18 & 188.619 & 10.4788 & \text{} & \text{} \\ \text{Total} & 19 & 774.049 & \text{} & \text{} & \text{} \\ \end{array}$

(* Unformatted entries from the table *)
model["ANOVATableEntries"]
{{1, 585.43, 585.43, 55.8679, 6.36078*10^-7}, {18, 188.619, 10.4788}, {19, 774.049}}
(* p-values from the table *)
model["ANOVATablePValues"]
{6.36078*10^-7}
(* response mean divided by the estimated standard deviation *)
model["CoefficientOfVariation"]
0.263479
$\endgroup$
  • $\begingroup$ Thats great, would you be able to do that with an ARmodel instead of the linear model fit? $\endgroup$ – ALEXANDER Sep 19 '13 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.