f[\[Alpha]_, \[Lambda]_] :=
ProbabilityDistribution[(
4*\[Lambda]*\[Alpha]*
x^(\[Alpha] - 1)*(1 - x)*(2 - x)^(\[Alpha] -
1)*(1 - x^\[Alpha]*(2 - x)^\[Alpha])^(\[Lambda] -
1))/(1 + (1 - x^\[Alpha]*(2 - x)^\[Alpha])^\[Lambda])^2, {x, 0,
1}, Assumptions -> \[Alpha] > 0 && \[Lambda] > 0]
n = 10
\[Kappa] = 1000
x = Table[RandomVariate[f[2, 0.5], n], {i, \[Kappa]}]
logl = Table[Sum[((
1 - (1 - x[[i]]^\[Alpha]*(2 - x[[i]])^\[Alpha])^\[Lambda])/(
1 + (1 - x[[i]]^\[Alpha]*(2 - x[[i]])^\[Alpha])^\[Lambda]) - i/(
n + 1))^2, {i, n}],{i, \[Kappa]}]
FindMinimum[{logl, \[Alpha] > 0, \[Lambda] > 0}, {{\[Alpha], 2}, {\[Lambda], 0.5}}]
I tried the above code to find the estimates and bias after simulating the data. For that ,I generated the sample from pdf. Then specified the function which is to be minimised, but i am unable to find the estimates. Could anyone please help me to correct the code to find the bias and estimates. As the sample size increases, bias to be decreased.
logl = LogLikelihood[f[α, λ], x]
. Also why are you creating κ many batches of n samples ? $\endgroup$x
is used in the definition of the probability distribution andx
is used to store the random samples if you don't clearx
each time you run the code and (2)FindMaximum
(good catch @flinty) takes a single function rather than a list of functions. So usingFindMaximum[{#, ....]& /@ logl
would get you the separate results. $\endgroup$