1
$\begingroup$

I am trying to find the best-fit trend for my data. Here I just generated it but let's say I don't know my data trend at all.

test = RandomVariate[NormalDistribution[100, 10], 100];
data = TemporalData[test];
proc = EstimatedProcess[data, ARMAProcess[3, 3]];
forecast = TimeSeriesForecast[proc, data, {5}, Method -> Automatic]
sims = RandomFunction[proc, {0, 10^2}, 4];
ListLinePlot[Join[data["Paths"], sims["Paths"]], 
PlotStyle -> {Directive[Thick, ColorData[1, 1]], ColorData[10, 1], 
ColorData[10, 2], ColorData[10, 3], ColorData[12, 4]}, 
PlotLegends -> {"data", "Simulations"}, ImageSize -> 550]

As results of the fit shows, neither of AutoRegressive methods of Mathematica are being fitted to my data. How can I use the Euler-Maruyama method mentioned here and disscuded here for fitting my data and have the fitness test data for it? How can I also do the Monte Carlo simulations for them and show upper, lower bound and mean of simulations on my data?

$\endgroup$
  • 1
    $\begingroup$ Isn't the problem that your data is non-zero mean? A common method is to subtract out the mean, do the fit with zero-mean data, and then add it back at the end. It's just a constant. $\endgroup$ – bill s Jun 19 '13 at 3:27
  • $\begingroup$ @bills yes you are right.I just notice the mistake in the first line of the code.But still I have fitness problem cause the result table is not giving proper P values .How can I use the Euler-Maruyama? $\endgroup$ – Alex Jun 19 '13 at 5:45
  • $\begingroup$ Is it imperative to use auto-regressive and/or Monte-Carlo methods? If not, Quantile Regression can be applied to find the trend and conditional PDF's. After finding a sufficient number of PDF's we can form a goodness of fit test. $\endgroup$ – Anton Antonov Feb 29 '16 at 21:40

Your Answer

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

Browse other questions tagged or ask your own question.