2
$\begingroup$

I want to know how to get the standard errors (and hopefully the CovarianceMatrix) for the constant and noise variance parameters of (say) an ARMAProcess fitted by TimeSeriesModelFit.

Example

So, for example, lets suppose we make an AR(1) process, sample it, and then do a fit:

SeedRandom[1];
testProcess = ARProcess[1, {.5}, 2];
samples = RandomFunction[testProcess, {1, 10000}];
timeSeriesModel = TimeSeriesModelFit@samples;

Above, in the second line, 1 is the constant offset of the AR(1) model, 0.5 is the coefficient, and 2 is the noise variance. We can look at the fitted model using Normal@timeSeriesModel, and we get

ARProcess[0.969334, {0.512352}, 1.94524]

so TimeSeriesModelFit has made an estimate of all three parameters, with some precision that it can presumably estimate. My question is how do I get these uncertainties in the model parameters as well as the correlations in uncertainties?

What I've tried

I tried to use timeSeriesModel@"ParameterTable", but all I got was the following table:

$\begin{array}{l|llll} \text{} & \text{Estimate} & \text{Standard Error} & \text{t-Statistic} & \text{P-Value} \\ \hline \mathit{a}_1 & 0.512352 & 0.00858776 & 59.6607 & \text{4.88712458388898319$\times10^{-664}$} \\ \end{array}$

Similarly if I want the correlations of errors in the model, I can use timeSeriesModel@"CovarianceMatrix", and I get

{{0.737496}}

which again only concerns the coefficient.

$\endgroup$

1 Answer 1

3
$\begingroup$

I think this is how you can get the covariances of the parameter estimates of $c$, $\rho$, and $v$:

logL = LogLikelihood[ARProcess[c, {ρ}, v], samples]

sol = Flatten[(EstimatedProcess[samples, ARProcess[c, {ρ}, v]]) /. ARProcess -> List]
(* {0.9693337798192243, 0.5123516081122499, 1.9452424330398612} *)

cov = -Inverse[(D[logL, {{c, ρ, v}, 2}]) /. Thread[{c, ρ, v} -> sol]] // MatrixForm

(* {{0.000485985, -0.000146633, 1.63498*10^-7}, 
 {-0.000146633, 0.00007376, -6.23427*10^-8},
 {1.63498*10^-7, -6.23427*10^-8, 0.000756962}} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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