# Simulation runs only for smaller number of iterations

The following code does not run for larger number of iterations . It runs for n=5 ,10 etc. but does not run for n=50 or greater. I tried to limit the accuracy goal and precision goal in 'FindDistributionParameters'. Any suggestions? Wondering at what place should I try ?NumericQ !

ClearAll[a0, d0]
ZP[sigma_, alpha_, theta_] :=
ProbabilityDistribution[alpha theta/
sigma (1 - Exp[-(x/sigma)^alpha])^(theta - 1) Exp[-(x/sigma)^
alpha ]*(x/sigma)^(alpha - 1), {x, 0, Infinity},
Assumptions -> sigma > 0 && alpha > 0 && theta > 0];
DistributionParameterAssumptions[ZP[sigma, alpha, theta]];
mydata =
Sort[RandomVariate[ZP[15, 2, 4], 50]]; myLCData = Take[mydata, -40];
Table[myinitalParameters =
Values[FindDistributionParameters[mydata, ZP[a0, 2, d0]]] //
FullSimplify;
myTData := Sort[RandomVariate[TruncatedDistribution[{0,Min[myLCData]},
ZP[myinitalParameters[], 2, myinitalParameters[]]], 10]];
myPCData := Join[myLCData, myTData]; mydata = myPCData;
myinitalParameters, {i, 5}]

• Your code runs fine on my computer with {i, 50} at the end. Try wrapping your Table in a Monitor[..., i] command to see how it's progressing. – Roman May 14 at 11:19
• It is not working on my computer. Adding monitor is not much help. Can you run it for i=100? Thanks. – nutan May 15 at 10:44
• For {i, 100} this code takes 86 seconds on my laptop, running Mathematica 12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019). What is your \$Version? – Roman May 15 at 11:51
• My version is 11.3.0. on McBook Air. I am still struggling with n=50. – nutan May 15 at 13:15
• Try with a fresh kernel? A MacBook Air isn't exactly powerful, but still it should do. – Roman May 15 at 13:52