Closed hrishikesh1985 closed 2 years ago
Hi @hrishikesh1985
The warning condition says that the additive condition is ignored with nlme
.
I would suggest a different algorithm, ie est="focei"
or est="saem"
Ok thanks...
While running different dataset for same code, i got below error, step halving factor reduced below minimum in PNLS step
I tried to control it using pnlstol but different values are obtained with different pnlstol value. what value should be used in to have best fit...
with foce, it shows
In (function (uif, data, est = NULL, control = list(), ..., sum.prod = FALSE, : initial ETAs were nudged; (can control by foceiControl(etaNudge=., etaNudge2=)) 2: In (function (uif, data, est = NULL, control = list(), ..., sum.prod = FALSE, : ETAs were reset to zero during optimization; (Can control by foceiControl(resetEtaP=.)) gradient problems with initial estimate and covariance; see $scaleInfo
but it is not resolved by controlling etanudge
etaNudge
only affects focei
. The etaNuge
is simply telling that the system could not solve at the initial estimates, and the etas were adjusted to be non-zero solve the initial problem.
The bigger problem is likely here:
gradient problems with initial estimate and covariance;
You could try
nlmixr(...., foceiControl(outerOpt="bobyqa")
which is a gradient free optimization.
As far as pnlsTol
, it should increase slightly to get a final solution. In my experience the more you increase it the more likely the ETAs will be zero for individuals, though.
This zero gradient is often caused by poor data, a bad model description of the data, or very flat likelihood surface for certain parameters (ie overparameterization)
OK. I am getting the warning of gradient problems every time.
i am trying to calculate the Emax and ED50 value which is calculated using below nlme model of winnonlin
E = Emax * C / (EC50 + C) error(EEps = 1) observe(EObs(C) = E + EEps) stparm(EC50 = tvEC50) stparm(Emax = tvEmax + nEmax) fixef(tvEC50 = 1, fixef(tvEmax = ranef(diag(nEmax) = c(1)) } The model is almost similar as defined above except C part.
However, there is slight difference in the result of both.
The slight difference should be expected, they are different software platforms and small differences are not problematic.
hmn... also, i am trying to optimize the model by using the obtained/resulted estimates as initial values for temax, ted50, eta.emax and add.err value.
Controlling the sigdig to different values shows significant change in the final estimates. Because obtained values are so near by and final fitted model shows values in 1 decimal only. so, it is dificult to identified what was the exact eta. emax for the same.
The sigdig
arguments controls many different tolerances by one figure. As the sigdig
increases the accuracy of the estimate increases. As described in the foceiCotnrol()
documentation, it sets
10^-sigdig
0.5*10^(-sigdig-2)
; For the sensitivity equations and steady-state solutions the default is 0.5*10^(-sigdig-1.5)
(sensitivity changes only applicable for liblsoda)5 * 10 ^ (-sigdig + 1)
In truth the optimization solvers can all be overwritten by what you specify, but the sigdig will affect the final solution.
With more significant digits, more accuracy is requested from the ODE solvers and the final estimate in the optimization routines.
These values are not exact but rather an estimate for all scenarios, so you will not be able to identify the "exact" eta for any problem.
thanks for all the support.. This has been figured out now.
Hi,
While using following, i got warning. data attached here.
myEmaxsaem <- function() { ini({ temax <- 20 ted50 <- 20 eta.emax ~ 1 add.err <- 1 }) model({ emax <- (temax + eta.emax) ed50 <- ted50
eff = (((emax)* time)/((ed50)+time)) eff ~ add(add.err) }) } myEmaxsaemfit <- nlmixr(myEmaxsaem, d_sim,est = "nlme", nlmeControl(gradHess=FALSE, opt = "nlm" ) )
Warning message: In (function (uif, data, est = NULL, control = list(), ..., sum.prod = FALSE, : initial condition for additive error ignored with nlme
how to resolve this?>
043_R.csv