The code is working good for other samples, but for few samples it is showing that the graph is not convergent.
"Consider looser convergence criteria or select "accept current estimates" under "iteration options". Failed: Cannot decrease objective function
The code is as below and I am attaching the samples for which it is not working well.
Names Default To Here( 1 );
dt= currentdatatable();
New Column( "Model",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
Parameter(
{p = 0.29, x0 = 15, m0 = 1.2, x1 = 30, m1 = 5},
p * (1 - Exp( -(X_mm / x0) ^ m0 )) + (1 - p) * (1
-Exp( -(X_mm / x1) ^ m1 ))
)
),
);
nlin = dt << Nonlinear(
SendToByGroup( Bygroup Default ),
Y( Ln_C ),
X( :Model ),
Iteration Limit( 1000 ),
Unthreaded( 1 ),
QuasiNewton BFGS,
//Newton,
Finish,
By( Sample_ID ),
);