# Need to help to get value for bigger calculation

8 messages
Open this post in threaded view
|

## Need to help to get value for bigger calculation

 Hello R-Experts, I want to calculate values like 15^200 or 17^300 in R. In normal case it can calculate the small values of b (a^b). I have fixed width = 10000 and digits = 22 but still answers are Inf. How to deal the cases like these? Thanks in advance. Regards, rehena         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Need to help to get value for bigger calculation

 Rehena Sultana yahoo.com> writes: > I want to calculate values like 15^200 or 17^300 in R. In normal case it can > calculate the small values of b (a^b). > I have fixed width = 10000 and digits = 22 but still answers are Inf. > > How to deal the cases like these? Thanks in advance.     library(Rmpfr)     m15 <- mpfr(15, precBits= 1024)     m15^200     165291991078820803015600259355571011187461128806050897708002963982861165     279305672605355515846488679511983197774726563035424119280679882914553697     406070345089013507994161512883544043567583004683422057135011584705353016     03376865386962890625 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Need help on "BBoptim"

 In reply to this post by rehena Hello R-Experts, I want to use "BBoptim" function to get mle. Is this possible? Practically I want to check whether moment estimate of mle is really mle for a given data set.  Thanks in advance. Regards, rehena         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Need help in using "OPTIM / OPTIMIZATION" function

 In reply to this post by rehena Hi R-Experts, I want to know "for one parameter case, which function is better or correct, optim or optimization?" I want to optimize the function to get mle using "optimization" function for single parameter case. Is there any other method to check the "optimization" really gives the global mle not the local mle.  Looking forward for your reply. Thanks in advance.  Regards, hena         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Integration in R

 In reply to this post by rehena Dear R - Experts,  I am trying to integrate lognormal distribution (mu = -0.3 and sigma2 = 0.00041.. ) based on the some hypothetical data. But I am getting 0 as the result. I have checked that my R-code is correct as code is giving me result for some other data. As I understand, when I am integrating some pdf with in the range of (0, Inf), I should not get 0. How to handle this kind of problem?  Please help. Looking forward for your reply.  Regards, rehena         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Integration in R

 On 21/11/12 22:26, Rehena Sultana wrote: > Dear R - Experts, > > I am trying to integrate lognormal distribution (mu = -0.3 and sigma2 = 0.00041.. ) based on the some hypothetical data. But I am getting 0 as the result. I have checked that my R-code is correct as code is giving me result for some other data. > > As I understand, when I am integrating some pdf with in the range of (0, Inf), I should not get 0. How to handle this kind of problem? > > Please help. Looking forward for your reply. Reproducible example? When I do integrate(function(x){dlnorm(x,meanlog=-0.3,sdlog=sqrt(0.00041))},0,Inf) I get      1 with absolute error < 3.5e-06 No problema. Why do you want to integrate it anyhow?  You know the answer is 1. Or if you want the integral from 0 to x for some x < infinity, just use plnorm().  (???)      cheers,          Rolf Turner ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.