similar to: Solving the equation using uniroot

Displaying 20 results from an estimated 100 matches similar to: "Solving the equation using uniroot"

2023 Aug 13
4
Noisy objective functions
While working on 'random walk' applications, I got interested in optimizing noisy objective functions. As an (artificial) example, the following is the Rosenbrock function, where Gaussian noise of standard deviation `sd = 0.01` is added to the function value. fn <- function(x) (1+rnorm(1, sd=0.01)) * adagio::fnRosenbrock(x) To smooth out the noise, define another
2006 Jul 22
1
ifelse command
Dear: I try to revise the maximum likelihood function below using something constrains. But it seems something wrong with it. Becasue R would not allow me to edit the function like this. It is very appreciate if you can help. function (parameters,y,x1,x2) { p<-parameters[1] alpha1<-parameters[2] beta1<-parameters[3)] delta1<-parameters[4] alpha2<-parameters[5]
2009 Dec 15
3
RFC: lchoose() vs lfactorial() etc
lgamma(x) and lfactorial(x) are defined to return ln|Gamma(x)| {= log(abs(gamma(x)))} or ln|Gamma(x+1)| respectively. Unfortunately, we haven't chosen the analogous definition for lchoose(). So, currently > lchoose(1/2, 1:10) [1] -0.6931472 -2.0794415 NaN -3.2425924 NaN -3.8869494 [7] NaN -4.3357508 NaN -4.6805913 Warning message: In
2010 Jun 02
2
help in expression( )
Hi, I was trying to have a graph whose axes are of the following type: X axis: n and Y axis: var[U ((a,b) in suffix, and (n,d) in the power)]. U ((a,b) in suffix, and (n,d) in the power)- U^(n,d) _ (a,b). Actually I require many plots involving different values of a,b,n,d, so need to keep this complicated notation. The code I used: plot(n, hn$h_pg,
2006 Jul 22
1
Why the contrain does not work for selecting a particular range of data?
Dear: Continuing the issue of 'ifelse'! I selecting the data whose 'x2'=1 for maximizing likelihood. I used two way to do this but the results are different. 1.Way one I use the data for x2=1 and run the program. It works for me. Tthe program is described as below: function (parameters,y1,x11) { p<-parameters[1] alpha1<-parameters[2] beta1<-parameters[3]
2001 Dec 04
3
factorial() not here (PR#1194)
Version 1.3.1 (2001-08-31) factorial() is not in R. It is in S-Plus with the definition factorial <- function(n) gamma(n + 1) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not
2012 Jan 13
1
Brillouin index
Dear colleagues. I wonder if anybody knows about a procedure in R to calculate the Brillouin Diversity index. I searched the net but did not find anything about it. Thanks a lot for any help Best, Philipp *************************************************** Prof. Dr. Philipp Fischer Head of AWI Center for Scientific Diving & Dept. In situ Ecology Section Shelf Sea Systems
2011 Sep 17
0
Warning in 'probtrans'-function ('mstate'-package)
Dear all, in order to estimate transition-specific probabilities in a multi-state model i applied the 'probtrans()' function from the 'mstate'-package. Now, i am at loss with the following message (see attached example): Warning message: In probtrans(msf.0, predt = 0) : Negative diagonal elements of (I+dA); the estimate may not be meaningful. I am not very familiar with matrix
2019 Jan 31
2
[RFC] migrating past C++11
On Tue, 29 Jan 2019 at 21:05, JF Bastien via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > The patch is about ready to land, which means any older compiler will soft-error (which you can turn off with LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN). I think we should then cherry-pick the patch to the LLVM 8 branch. > > The last remaining issue are the buildbots. I audited *all* bots in
2011 Feb 01
6
help
PLEASE HELP I actually want to do the following: a[j] = (1/(j!))*Π (i-1-d), j = 500, Π means product i = 1 to j   Yet, j! will stop at 170 and Π (i-1-d) at 172; so, a[j] will not exceed 170. I would like to have at least 200 a[j].   WHAT SHOULD I DO?   PLEASE SEE MY CODE FOR DETAIL!! #################################################### R CODE:
2006 Nov 15
1
OPTIM--non finite finite different [13]
Dear All: I used optim() to minimise the loglikelihood function for fitting data to negative binomial distribution. But there initial value of log-likelihood and iteration 10 value are reasonable. for example: initial value 1451657.994524 iter 10 value 47297.534905 iter 20 value -623478636.8236478 Then the iter 20 vlaue suddelnly changes to a negative value and in the end the error mesage is
2019 Feb 02
2
[RFC] migrating past C++11
After a few attempts I think we’re in sight of success: we only have the two following bots remaining with old versions of libstdc++ and new versions of clang: polly-amd64-linux polly-arm-linux Once fixed the toolchain bump should stick. > On Jan 31, 2019, at 2:07 PM, JF Bastien via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > >> On Jan 31, 2019, at 2:03 PM,
2008 Jul 09
1
Loglikelihood for x factorial?
Hi Rers, I have a silly question. I don't know how to express the loglikelihood function of 1/(x!) where x=x1,x2,....xn in R. Could anyone give me a hint? Thank you in advance. Chunhao Tu
2011 May 09
1
Stirlings Approximation
I have some big combinations like: 4444444444444444444444444444 choose 784645433 Can R compute these? Is there any package that does stirlings approximation in R? -- Thanks, Jim. [[alternative HTML version deleted]]
2008 Aug 12
2
Maximum likelihood estimation
Hello, I am struggling for some time now to estimate AR(1) process for commodity price time series. I did it in STATA but cannot get a result in R. The equation I want to estimate is: p(t)=a+b*p(t-1)+error Using STATA I get 0.92 for a, and 0.73 for b. Code that I use in R is: p<-matrix(data$p) # price at time t lp<-cbind(1,data$lp) # price at time t-1
2009 Apr 22
5
large factorials
I am working on a project that requires me to do very large factorial evaluations. On R the built in factorial function and the one I created both are not able to do factorials over 170. The first gives an error and mine return Inf. Is there a way to have R do these larger calculations (the calculator in accessories can do 10000 factorial and Maple can do even larger) -- View this message in
2019 Feb 07
5
[RFC] migrating past C++11
Indeed this has finally stuck, with just clang-with-lto-ubuntu broken at the moment. I’m inclined to leave it checked in, and try to get it into the LLVM 8 branch as well. > On Feb 7, 2019, at 9:18 AM, paul.robinson at sony.com wrote: > > It seems the CMake changes have landed; but the docs are still a bit out of date? > CMake.html talks about LLVM_FORCE_USE_OLD_TOOLCHAIN but not
2019 Jan 26
4
[RFC] migrating past C++11
+1, thanks again for driving this. On Fri, Jan 25, 2019 at 3:57 PM JF Bastien via llvm-dev < llvm-dev at lists.llvm.org> wrote: > The discussion seems to have died down and gotten good consensus. I’ve > therefore create a patch which applies the proposed soft-errors: > > https://reviews.llvm.org/D57264 > > > We’ll only migrate to hard-error (and start using new
2007 Jan 06
2
negative binomial family glm R and STATA
Dear Lister, I am facing a strange problem fitting a GLM of the negative binomial family. Actually, I tried to estimate theta (the scale parameter) through glm.nb from MASS and could get convergence only relaxing the convergence tolerance to 1e-3. With warning messages: glm1<-glm.nb(nbcas~.,data=zonesdb4,control=glm.control(epsilon = 1e-3)) There were 25 warnings (use warnings() to see
2006 May 16
1
r-help@stat.math.ethz.ch
Dear All: I tried to fit negative binomial distribution to data in terms of mean and mean is also a quadratic function of another variable. The likelihood function is: function (parameters, y1,x11) { p<-parameters[1] alpha1<-parameters[1] beta1<-parameters[2] delta1<-parameters[3] mu<-alpha1+beta1*(x11)+delta1*(x11^2) ifelse(y1>=0|x11>=0, L<-