[R] Optimization package
bhh at xs4all.nl
Thu Sep 15 07:56:31 CEST 2011
Diviya Smith wrote:
> Hi there,
> I have a complex math equation which does not have a closed form solution.
> It is -
> y <- (p*exp(-a*d)*(1-exp((d-p)*(a-x))))/((p-d)*(1-exp(-p*(a-x))))
> For this equation, I have all the values except for x. So I need to
> this problem numerically. Can anyone suggest an optimization package that
> can use to estimate the value for x?
So you have data for : a, d, p and y?
Define a function
f <- function(x) y -
and use uniroot to solve f(x) = 0 and set x to the root found by uniroot.
View this message in context: http://r.789695.n4.nabble.com/Optimization-package-tp3814296p3814747.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help