Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
1  
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. –  bill s Jun 19 '13 at 3:27
    
@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? –  Alex Jun 19 '13 at 5:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.