# Weibull Count Process, how to build in Mathematica

I am trying to solve the following problem in MATHEMATICA:

(PROBLEM SOLVED, LOOK THE FOLLOWING ANSWER)

I was reading this paper: McShane et al. "Count Models Based on Weibull Interarrival Times" (2008) Link:http://www.blakemcshane.com/Papers/jbes_weibull.pdf

This paper a new counting model using a Weibull distribution is implemented.In page 5, it shows the derivation of the final results: How is it possible to implement this Weibull count process in Mathematica?

I made some tests, but I am not sure if it is correct: For example this is the alfa:

ClearAll["Global*"] (*Clear all the variables*)
f[xx_, jj_, gino_] :=
If[xx == 0, ((cc*jj)!)/(jj!),
Sum[(((cc*jj - cc*mm)!)/((jj - mm)!))*gino, {mm, xx - 1, jj - 1}]];

Alfajjxx[xx_] =
f[xx, jj,
f[xx - 1, jj,
f[xx - 2, jj,
f[xx - 3, jj,
f[xx - 4, jj,
f[xx - 5, jj,
f[xx - 6, jj,
f[xx - 7, jj,
f[xx - 8, jj, f[xx - 9, jj, f[xx - 10, jj, gino]]]]]]]]]]];
(* how is it possible to implement the above equation using Nest \
function?*)

(*show the test results*)
Alfajjxx
f[0, jj, gino]
Alfajjxx
f[1, jj, f[0, jj, gino]]
Alfajjxx
f[2, jj, f[1, jj, f[0, jj, gino]]]
Alfajjxx
f[3, jj, f[2, jj, f[1, jj, f[0, jj, f[0, jj, gino]]]]]

(*implementing the WeibullCountModel*)
wcd[xx_] =
Sum[((((-1)^(xx + jj)) ((lb*(t^cc))^jj))*
Alfajjxx[xx])/((cc*jj)!), {jj, xx, 5}](*Weibull Count Model*)


I do not know if it is correct the implementation, moreover I would use the Nest function to define the alfa coefficient.

Can anyone help me, plese? Thank you very much

I have just solved it.

I found a Python code implementing this Weibull Count model.

Here there are the Mathematica code:

A[xx_, jj_] =
If[xx == 0, A[xx, jj] = (Gamma[cc*jj + 1])/(Gamma[jj + 1]),
A[xx, jj] =
Sum[A[xx - 1,
mm]*(Gamma[cc jj - cc mm + 1]/Gamma[jj - mm + 1]), {mm, xx - 1,
jj - 1}]]
A[0, 20]
Normal[%]

Cn[t_, xx_] =
Sum[(((-1)^(xx + jj))*(((ll*(t^cc)))^jj)*A[xx, jj])/(Gamma[
cc*jj + 1]), {jj, xx, 20}]
Cn[1, 0]
Cn[1, 1]
Cn[1, 2]
Cn[1, 3]
Cn[1, 4]
Cn[1, 5]
Cn[1, 6]
Cn[1, 7]
Cn[1, 8]
`

Now I have a new question, is it possible to use that equation for the regression analysis?

Thanks a lot!