Re: [R] solver in R

From: Richard Rowe <richard.rowe_at_jcu.edu.au>
Date: Mon, 31 Mar 2008 16:43:30 +1000

library(MASS) check out fitdistr( ) ... ?fitdistr This isn't 'solver', but then again R isn't MS Excel!

Roslina Zakaria wrote:
> Dear R-users,
> Is there any function in R that works similarly like solver in Excel. I have a set of daily rainfall data and I would like to estimate alpha and beta for the gamma function.
>
> Here is my daily rainfall data:
> [1] 0.2 1.2 0.0 0.0 0.0 0.0 0.0 0.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.8 1.6 0.0 1.8 1.8 0.0 2.6
> [24] 33.0 19.0 0.0 0.0 0.6 0.0 0.0 6.8 0.2 0.0 0.0 0.0 0.0 0.2 0.0 0.0 0.0 0.0 0.0 0.0 1.6 5.4 0.0
> [47] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0.0 0.0 6.0 6.6 0.0 0.0 0.0 0.0 0.2 0.0 0.0 0.0 0.0
> [70] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 12.8 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0.0 3.8 2.2 1.2 12.2 3.0 0.0 0.0
> [93] 0.0 0.0 5.0 3.6 0.0 0.0 0.0 1.8 1.8 1.2 1.2 1.6 3.6 0.2 0.8 0.0 0.0 0.0 0.0 0.0 1.4 16.6 0.0
> [116] 1.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.8 5.4
> [139] 1.6 5.8 0.4 34.2 0.0 0.4 0.4 1.4 1.8 0.0 0.0 0.2 0.0 2.4 24.2 0.4 0.0 0.0 0.0 1.6 0.0 0.0 0.0
> [162] 0.0 0.2 0.0 0.0 0.0 4.4 0.0 4.4 21.2 3.0 0.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
> [185] 0.0 0.8 0.8 3.6 0.0 1.2 0.0 0.0 0.0 0.0 0.0 0.0 13.8 1.6 6.6 5.0 0.0 1.2 0.0 1.0 1.2 2.4 6.0
> [208] 2.8 7.0 0.2 0.6 0.0 0.0 0.0 0.0 0.0 3.2 0.2 2.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0
> [231] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.2 6.6 2.4 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.6 0.0 0.0 0.0
> [254] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.4 2.6 0.0 0.6 4.8 0.0 0.2 3.8 17.0 0.2 0.0 0.0 0.0
> [277] 43.6 2.6 0.0 0.0 0.0 0.4 8.2 14.4 0.2 0.0 0.0 0.0 1.8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.2
> [300] 0.0
>
> Thank you in advance for your help.
>
>
> ____________________________________________________________________________________
> Looking for last minute shopping deals?
>
> ______________________________________________
> 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.
>
>

-- 
Dr Richard Rowe
Zoology & Tropical Ecology
School of Marine & Tropical Biology
James Cook University
Townsville 4811
AUSTRALIA

ph +61 7 47 81 4851
fax +61 7 47 25 1570
JCU has CRICOS Provider Code 00117J

______________________________________________
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.
Received on Mon 31 Mar 2008 - 06:48:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 31 Mar 2008 - 07:30:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive