DANIEL PRECIADO
2017-Mar-21 10:57 UTC
[R] nlmrt problems - No confInt, NA StdErr, t-, or p-values
Dear list, I want to use nlxb (package nlmrt) to fit different datasets to a gaussian, obtain parameters (including standard error, t-and p-value) and confidence intervals. nlxb generates the parameters, but very often results in NA standard error,t-and p-values. Furthermore, using confint() to obtain the confidence intervals generates a : Error in vcov.default(object) : object does not have variance-covariance matrix" erro. Can someone indicate why is nlxb generating NAs (when nls has no problem with them) and how to obtain confidence intervals from an nlmrt object? Thanks [[alternative HTML version deleted]]
Gabor Grothendieck
2017-Mar-21 13:12 UTC
[R] nlmrt problems - No confInt, NA StdErr, t-, or p-values
You can use wrapnls from the nlmrt package to get an nls object. Run it instead of nlxb. It runs nlxb followed by nls so that the output is an nls object.. Then you can use all of nls' methods. On occiasion that fails even if nlxb succeeds since the nls optimization can fail independently of nlxb. Also, it does not show the output from nlxb, only from the final nls, so you could alternately run nlxb and then run nls2 from the nls2 package after that. nls2 can compute the nls object at a particular set of coefficients so no second optimization that could fail is done. Here is an example that uses nls2 to generate starting values for nlxb, then runs nlxb and then uses nls2 again to get an nls object so that it canthen use nls methods (in this case fitted) on it. http://stackoverflow.com/questions/42511278/nls-curve-fit-singular-matrix-error/42513058#42513058 On Tue, Mar 21, 2017 at 6:57 AM, DANIEL PRECIADO <danprec at hotmail.com> wrote:> Dear list, > > I want to use nlxb (package nlmrt) to fit different datasets to a gaussian, obtain parameters (including standard error, t-and p-value) and confidence intervals. > > nlxb generates the parameters, but very often results in NA standard error,t-and p-values. Furthermore, using confint() to obtain the confidence intervals generates a : Error in vcov.default(object) : object does not have variance-covariance matrix" erro. > > Can someone indicate why is nlxb generating NAs (when nls has no problem with them) and how to obtain confidence intervals from an nlmrt object? > > Thanks > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
J C Nash
2017-Mar-21 21:18 UTC
[R] nlmrt problems - No confInt, NA StdErr, t-, or p-values
Note that the recently released package nlsr by Duncan Murdoch and I has a slight update in the functions nlxb() and nlfb() as well as a lot of features for symbolic derivative calculation. JN On 2017-03-21 06:57 AM, DANIEL PRECIADO wrote:> Dear list, > > I want to use nlxb (package nlmrt) to fit different datasets to a gaussian, obtain parameters (including standard error, t-and p-value) and confidence intervals. > > nlxb generates the parameters, but very often results in NA standard error,t-and p-values. Furthermore, using confint() to obtain the confidence intervals generates a : Error in vcov.default(object) : object does not have variance-covariance matrix" erro. > > Can someone indicate why is nlxb generating NAs (when nls has no problem with them) and how to obtain confidence intervals from an nlmrt object? > > Thanks > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >