Re: [R] Solving Systems of Non-linear equations

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Thu 01 Dec 2005 - 03:02:12 EST

Scott Story <sstory@montana.edu> writes:

> I am trying to write a function that will solve a simple system of
> nonlinear equations for the parameters that describe the beta
> distribution (a,b) given the mean and variance.
>
>
> mean = a/(a+b)
> variance = (a*b)/(((a+b)^2) * (a+b+1))
>
> Any help as to where to start would be welcome.

On a pad of paper...

First look at mean*(1-mean)/variance, and the rest should follow. (Hint minimized in case this was homework...)

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Dec 01 04:03:21 2005

This archive was generated by hypermail 2.1.8 : Thu 01 Dec 2005 - 09:31:48 EST