Model definition & Parameter estimation

Poisson process model

logLHP[data_,λ0_]:=(∑_(i=1)^(Length[data]))((∑_(j=1)^(Length[data[[i]]]))Log[λ0]-Integrate[λ0,{s,0,Last@data[[i]]}]);

(*We can obtain estimates by maximizing the log-likelihood function.*)
(*Note that the variable "data" is required as input data, where data={t_{ij}} for i=1,2,...,n and j=1,2,...,ν_i. One can creat this data from http://sumodb.sumogames.de.*)
(*FindMaximum[{logLHP[data,λ0]},{λ0,4}]*)

estPoissonParams={530.0141257569121`,{λ0->4.671046668401829`}};

Proposed model

Definition of the log-likelihood function

int1[t_,λ0_]=λ0 ;
int2[t_,t1_,λ0_,a_,b_]=a b (t-t1)^(b-1)+λ0 ;
funcR[1,etimes_,eβ_]:=0
funcR[j_,etimes_,eβ_]:=Exp[-eβ (etimes[[j]]-etimes[[j-1]])] (1+funcR[j-1,etimes,eβ])
logLHa2[data_,eλ0_,ea_,eb_,eα_,eβ_]:=(∑_(i=1)^(Length[data]))(-int1[data[[i,1]],eλ0]data[[i,1]]-Integrate[int2[s,data[[i,1]],eλ0,ea,eb],{s,data[[i,1]],Last@data[[i]]}]-(∑_(j=1)^(Length[data[[i]]]))((eα (1-Exp[-eβ (Last[data[[i]]]-data[[i,j]])]))/(eβ))+Log[eλ0+eα funcR[1,data[[i]],eβ]]+(∑_(j=2)^(Length[data[[i]]]))Log[int2[data[[i,j]],data[[i,1]],eλ0,ea,eb]+eα funcR[j,data[[i]],eβ]]);

Parameter estimation

(*We can obtain estimates by maximizing the log-likelihood function.*)
(*Note that the variable "data" is required as input data, where data={t_{ij}} for i=1,2,...,n and j=1,2,...,ν_i. One can creat this data from http://sumodb.sumogames.de.*)
(*FindMaximum[{logLHa2[data,eλ0,ea,eb,eα,eβ],eλ0>0&&ea>0&&eb>0&&eα>0&&eβ>0},{{eλ0,3.5},{ea,1},{eb,2},{eα,2.5},{eβ,2}}]*)

estProposedParams={638.9640208205502`,{eλ0->2.68485784355333`,ea->1.3994299860607362`,eb->2.6894924832411706`,eα->2.8658874791499005`,eβ->7.625604828913055`}};

Visualization of the proposed model

(*Example data of player hours at kyujo occurrences for a sumo wrestler*)
sample={(36/125),(58/125),(597/1000),(121/200),(96/125),(429/500),(117/125),(1053/1000)};
(*Intensity function of the proposed model*)
intProposed[t_,etimes_,λ0_,a_,b_,α_,β_]:=λ0+If[etimes[[1]]<=t,a b (t-etimes[[1]])^(b-1)+(∑_(i=1)^(Count[etimes,u_/;u≤t]))α Exp[-β (t-etimes[[i]])],0]
(*Behavior of the intensity function*)
Plot[intProposed[t,sample,estProposedParams[[2,1,2]],estProposedParams[[2,2,2]],estProposedParams[[2,3,2]],estProposedParams[[2,4,2]],estProposedParams[[2,5,2]]],{t,0,2},PlotLegends->None,PlotRange->{{0,Automatic},{0,Automatic}},PlotStyle->Black,LabelStyle->{FontFamily->"Times",FontSize->16},AxesStyle->{{Thickness->0.004,Black},{Thickness->0.004,Black}}]

Simulation

Simulation of the Poisson process model

Simulation result

endPoint=1;
pathsPoisson=RandomFunction[PoissonProcess[4.671],{0,endPoint},1]//Normal

Simulation of the proposed model

Definition of the simulator

intProposed[t_,etimes_,λ0_,a_,b_,α_,β_]:=λ0+If[etimes[[1]]<=t,a b (t-etimes[[1]])^(b-1)+(∑_(i=1)^(Count[etimes,u_/;u≤t]))α Exp[-β (t-etimes[[i]])],0]

(*This function can generate simulated player hours at kyujo occurrences from the proposed model by the thinning algorithm.*)
(*Output is pairs of player hours and the number of kyujo occurrences.*)
SimProposedModel[ite_,estParams_,totalT_]:=Module[{paths,simα,i,n,s,t,result,λs,d},
SeedRandom[1];
simα=estParams[[2,4,2]];
paths={};
For[i=1,i≤ite,i++,
result={};
n=1;
s=RandomVariate[ProbabilityDistribution[{"HF",estParams[[2,1,2]]},{t,0,∞}],1][[1]];
AppendTo[result,{s,n}];
While[True,
n++;
λs=intProposed[Last@result[[All,1]],result[[All,1]],estParams[[2,1,2]],estParams[[2,2,2]],estParams[[2,3,2]],estParams[[2,4,2]],estParams[[2,5,2]]]+simα;
s=s-(1/(λs))Log[RandomReal[]];
If[s>totalT,Break[]];
d=RandomReal[];
If[d≤((intProposed[s,result[[All,1]],estParams[[2,1,2]],estParams[[2,2,2]],estParams[[2,3,2]],estParams[[2,4,2]],estParams[[2,5,2]]])/(λs)),AppendTo[result,{s,n}],
While[d>((intProposed[s,result[[All,1]],estParams[[2,1,2]],estParams[[2,2,2]],estParams[[2,3,2]],estParams[[2,4,2]],estParams[[2,5,2]]])/(λs)),λs=intProposed[s,result[[All,1]],estParams[[2,1,2]],estParams[[2,2,2]],estParams[[2,3,2]],estParams[[2,4,2]],estParams[[2,5,2]]];s=s-(1/(λs))Log[RandomReal[]];If[s>totalT,Break[]];d=RandomReal[];If[d≤((intProposed[s,result[[All,1]],estParams[[2,1,2]],estParams[[2,2,2]],estParams[[2,3,2]],estParams[[2,4,2]],estParams[[2,5,2]]])/(λs)),AppendTo[result,{s,n}]];]
];

];
PrependTo[result,{0,0}];
AppendTo[paths,result];
];
Return[paths]
]

Simulation result

iterations=1;
endPoint=1;
estProposedParams={638.9640208205502`,{eλ0->2.685,ea->1.399,eb->2.689,eα->2.866,eβ->7.626}};
pathsProposed=SimProposedModel[iterations,estProposedParams,endPoint];

pathsProposed