When I tried to run the following simulation for say 5 times, it runs successfully but when I tried to run it for 50 or 200 times it never terminates or produces results. I tried to limit the accuracy goal and precision goal in the 'FindDistributionParameters', it did not work. I thought that IntegerQ? needs to be inserted some place in the definition of the distribution very first line. I tried but that did not work either. Thanks.
ClearAll[a0, d0]
ExpoWeibull[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[ExpoWeibull[sigma, alpha, theta]];
TruncatedEW[sigma_, alpha_, theta_, c_] :=
TruncatedDistribution[{c, \[Infinity]},
ExpoWeibull[sigma, alpha, theta]];
mydata = Sort[RandomVariate[ExpoWeibull[15, 2, 4], 50]];
myp = Values[
FindDistributionParameters[mydata, ExpoWeibull[a0, 2, d0]]];
myLeftCensoredData = Take[mydata, -40];
Table[myinitalParameters =
Values[FindDistributionParameters[mydata, ExpoWeibull[a0, 2, d0]] //
FullSimplify];
myTruncatedData :=
Sort[RandomVariate[
TruncatedDistribution[{0, Min[myLeftCensoredData]},
ExpoWeibull[myinitalParameters[[1]], 2,
myinitalParameters[[2]]]], 10]];
myPseudoCompleteData := Join[myLeftCensoredData, myTruncatedData];
mydata = myPseudoCompleteData;
myinitalParameters, {i, 1, 20}]