[R] Solving equations in R

Duncan Murdoch murdoch.duncan at gmail.com
Mon Jul 23 21:14:51 CEST 2012


On 23/07/2012 2:46 PM, Diviya Smith wrote:
> Hi there,
>
> I would like to solve the following equation in R  to estimate 'a'. I have
> the amp, d, x and y.
>
> amp*y^2 = 2*a*(1-a)*(-a*d+(1-a)*x)^2
>
> test data:
>     amp = 0.2370 y=
> 0.0233 d=
> 0.002 x=
> 0.091
> Can anyone suggest how I can set this up?

See ?polyroot.

Duncan Murdoch



More information about the R-help mailing list