I got a recursive equation to solve, the equation is equation A13 shown in the picture. It is actually much easier than it seems, cause the v and h are constants.
And we can take the p(h/1+nh)/p(h/1+(n+1)h) as a whole, noted as a(n). Then we can simplify the equation as follows (I'm going to show the matlab code),
h = 0.374 ;
v = 4 ;
c1 = @(n) ( (1+(n+2)*h)./(1+(n+3)*h) ).^(2/(v-2 ));
c2 = @(n) v/2*( (1+(n+2)*h)./(1+n*h) ).^(v-2 );
a(1) = (1+h)/(1+2*h) ;
for n = 1:100
a(n+1) = c1(n) *(c2(n)*a(n)^2 - a(n)^v)^(1/(v-2 ));
end
A=prod(a)

The A is the final value I need to get here. It is the product of all the 101 values of a(n).
But since my data is panel data, matlab cannot deal with panel data so well. I need to translate the code into stata. Could you help me please? Thank you!
Array