I am trying to implement this function and solve for parameters:
Now as many can see it is a maximum likelihood estimation: I have this data:
data = RandomFunction[
OrnsteinUhlenbeckProcess[0, 4, 5, 13], {0, 120, 1}][[2]][[1, 1]];
Now I want to find these parameters given I have this MLF, as above:
tdata = Range[0, 120];
func = -(n/2) Log[σ^2/(2 η)] -
1/2 Sum[Log[
1 - E^(-2 η (Subscript[t, i] - Subscript[t, i - 1]))], {i,
1, n}] - η/σ^2 Sum[(Subscript[x, Subscript[t,
i]] - μ - (Subscript[x, Subscript[t,
i - 1]] - μ) E^(-(η (Subscript[t, i] - Subscript[t,
i - 1]))))^2/(1 -
E^(-(2 η (Subscript[t, i] - Subscript[t, i - 1])))), {i, 1,
n}]
xis = Table[Subscript[x, Subscript[t, i]], {i, 0, Length[data] - 1}];
xrules = Thread[xis -> data];
ts = Thread[Subscript[t, Range[0, Length[data] - 1]]];
trules = Thread[ts -> tdata];
ff = (func /. n -> Length[data] - 1);
ffun = ff /. xrules /. trules // FullSimplify;
f1 = D[file, μ] == 0 // FullSimplify
f2 = D[file, η] == 0 // FullSimplify
f3 = D[file, σ] == 0 // FullSimplify
Now, if I have done anything wrong in how to state the problem in mathematica, please let me know.
No there are to possibilities here, it might be that I have stated the problem in Mathematica wrongly or I simply cannot figure out how to use mathematica properly to solve for these values. I was expected a numerical estimation method.
Could someone please take the time to help me, as I believe this would give me the opportunity to understand how to state more complex problems in mathematica, and how to properly use the software to solve different challenges. If there is anything that is required for me to improve this question please let me know.
Thank you.
file
defined? $\endgroup$