[R] nls

Bert Gunter gunter.berton at gene.com
Fri Feb 25 18:22:40 CET 2011


On Fri, Feb 25, 2011 at 6:09 AM, Abeer Fadda
<a.fadda at zmbh.uni-heidelberg.de> wrote:
> hi,
> I would like to find the x value (independent variable) for a certain dependent value using the fitted model with nls.
> with (predict) I can find y that corresponds to a list of x. I need the other way around. can it be done?
> thanks,
> afadda

Yes.

-- Bert




... Oh, if you mean HOW can it be done? -- lots of ways. Analytically,
if y=f(x) is your fitted model, just backsolve x = g(y).

If your algebra isn't up to the task, then just predict y on a
suitably fine x grid, and (assuming monotonicity) find the x
corresponding to the predicted y closest to the y you wish to back
calibrate. This is just a matter of indexing. See ?which.




>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>



-- 
Bert Gunter
Genentech Nonclinical Biostatistics



More information about the R-help mailing list