I'm estimating the ARProcess parameters of a set of 1000 time series generated with an ARProcess and RandomFunction. Each time series is short (34 points), so I expect quite some noise, but on average I expect to see my input parameter (0.48) back. However, it looks like EstimatedProcess systematically underestimates this parameter. Is this an error or is this expected and explainable? A colleague of mine claims that Matlab doesn't have this issue.

Through[{Mean, StandardDeviation}[
    (EstimatedProcess[#, ARProcess[{a}, v]] & /@ 
     RandomFunction[ARProcess[{.48}, 1], {1, 34}, 1000]["Paths"]
    )[[All, 1, 1]]]

{0.388234, 0.156857}

Fixing the variance term v on 1 in the EstimatedProcess does not make a difference.


Maybe Matlab has the bias. First, one would need to check on if the estimates are the same in Mathematica and Matlab (when given the same options). (I don't have a copy of Matlab so I'll compare using R.) If those estimates are the same, then checking on the data creation process would need to be examined.

Given the following 34 data points:

x = {0.762581453, 1.432767666, 1.729161761, 1.487405427, 1.795480445, 
     1.029690811, 0.569472382, -0.023059941, -0.156831325, 0.429908074,
    -0.632142053, -0.262679203, 0.701932332, 1.051120549, 0.11186958,
    -0.319916758, -1.550805411, -0.106264866, -0.285184731, -0.847601482,
    -2.4669689, -2.528088859, 0.048553687, 1.714408932, 2.314229506,
    -0.459274584, -1.224375149, -1.132357697, -1.307473818, -0.729989006,
     0.814224672, 0.798828446, -0.587769684, 1.204700686};

Estimation in Mathematica:

EstimatedProcess[x, ARProcess[{r}, v], ProcessEstimator -> "MaximumLikelihood"]
(* ARProcess[{0.579037}, 0.904965] *)

Estimation in R:

x = c(0.762581453,1.432767666,1.729161761,1.487405427,1.795480445,1.029690811,     

estimate = ar(x, method="mle", order.max=1)
# [1] 0.5799839 0.9040807

Those two sets of estimates are close enough such that any bias that might be due to differences in estimation are ruled out. That leaves 2 other possibilities: (1) Bias in the data creation process and (2) bias associated with the maximum likelihood estimator.

I don't have time to check out (1) but if one raises the sample length from 34 to 1,000, the bias seems to go away. That suggests that it's likely the usual sample size bias that maximum likelihood estimators can have.

   StandardDeviation}[(EstimatedProcess[#, ARProcess[{a}, v]] & /@ 
     RandomFunction[ARProcess[{.48}, 1], {1, 1000}, 1000]["Paths"])[[All, 1, 1]]]]

(* {0.476582, 0.0267468} *)
  • $\begingroup$ Thanks for your response. I was aware that with increasing sample size the bias seems to appear. So, I'm particularly interested in the short sample bias. I have the feeling that this is not just a MLE issue as you hypothesize, as other available methods like MethodOfMoments and SpectralEstimator show a similar bias. I'm currently running the Matlab equivalent for 100,000 paths (will take the whole night as it is pretty slow), but my initial impression is that it has a bias as well, but a smaller one (looks like it typically answers around 0.43 instead of Mathematica's 0.4). $\endgroup$ – Sjoerd C. de Vries Sep 13 '17 at 21:03
  • $\begingroup$ The Matlab calculation returned 0.42, so it is biased as well (though perhaps less than Mathematica). $\endgroup$ – Sjoerd C. de Vries Sep 14 '17 at 12:39
  • $\begingroup$ Bias is associated with a statistical estimation method (maximum likelihood, least-squares, Yule-Walker, etc.) and not with an implementation in R, Mathematica, or MATLAB. There is a specific bias with the maximum likelihood estimation process. That simulations with MATLAB are closer than with Mathematica" to the "parent parameter" of the data generation process does not make *MATLAB less biased. It is how close to the "true" bias that counts. $\endgroup$ – JimB Sep 14 '17 at 14:53
  • $\begingroup$ The following articles should be helpful: "The Bias of Autoregressive Coefficient Estimators"(tandfonline.com/doi/abs/10.1080/01621459.1988.10478672), "A program to calculate the empirical bias in autocorrelation estimators" (psicothema.com/pdf/781.pdf (includes MATLAB code)), and "On the bias of the least squares estimator for the first order autoregressive process" (link.springer.com/article/10.1007/BF00050668). $\endgroup$ – JimB Sep 14 '17 at 14:55
  • $\begingroup$ Thanks Jim, I'll look into them. $\endgroup$ – Sjoerd C. de Vries Sep 14 '17 at 18:49

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.