[R] Solving Equations

David Winsemius dwinsemius at comcast.net
Sun Jan 22 20:05:14 CET 2012


On Jan 22, 2012, at 1:25 PM, Eliano wrote:

> People,
>
> I'm researching some Bayesian statistic topics and in the midle of  
> my study
> i found a very simple problem and i'm trying to find a simple  
> package to
> solve this type of equations:
>
> Lets say that i need to compute beta values for the beta  
> distribution and i
> now for example:
>
> E(teta)=a/(a+b) = 0,5
> Var(teta)=ab/((a+b)^2(a+b+1))=0.05
>
> So if i want to solve this to non-linear system to find a,b for the  
> beta
> distribution wich pack should i use?
>
> I know that a=2 and b=2 because i calculated it.

It depends on you meaning for the word "solve". If you want symbolic  
math, then the Ryacas package provides that facilities. If you want  
numerical estimation, then you should provide the data in your posting  
AND study the help pages for `nls` AND do searches in the Task Views  
AND the rhelp Archives for the wealth of worked examples available .

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list