similar to: Optim

Displaying 20 results from an estimated 5000 matches similar to: "Optim"

2006 Jun 22
1
Why different results with different initial values for MLE (optim)!
Hi, All: I used optim() to minimise likelihood function for fitting the data to a partiuclar distribution. The function is converged and the value of log-likelihood is different when I change the intial value. Whether it means the program does not work well? Thanks! Xin [[alternative HTML version deleted]]
2004 Feb 17
2
Installing package on R
Hello I have a XP on my Pc ,and I would like to install the splancs package on my machine what is the step for implementing them on my library? --------------------------------- [[alternative HTML version deleted]]
2004 Feb 16
2
problem for installing package
Hello I would like to install a package on R (splancs package) after downloading them what is the step for implementing them in my library? Thank you. --------------------------------- [[alternative HTML version deleted]]
2008 Mar 13
3
Use of ellipses ... in argument list of optim(), integrate(), etc.
Hi, I have noticed that there is a change in the use of ellipses or . in R versions 2.6.1 and later. In versions 2.5.1 and earlier, the . were always at the end of the argument list, but in 2.6.1 they are placed after the main arguments and before method control arguments. This results in the user having to specify the exact (complete) names of the control arguments, i.e. partial matching is
2009 Jul 02
2
constrained optimisation in R.
i want to estimate parameters with maximum likelihood method with contraints (contant numbers). for example sum(Ai)=0 and sum(Bi)=0 i have done it without the constraints but i realised that i have to use the contraints. Without constraints(just a part-not complete): skellamreg_LL=function(parameters,z,design) { n=length(z); mu=parameters[1]; H=parameters[2]; Apar=parameters[3:10];
2007 Jun 20
4
finding roots of multivariate equation
Hello, I want to find the roots of an equation in two variables. I am aware of the uniroot function, which can do this for a function with a single variable (as I understand it...) but cannot find a function that does this for an equation with more than one variable. I am looking for something implementing similar to a Newton-Raphson algorithm. Thanks. -- Bill Shipley North American Editor for
2007 Apr 23
4
Estimates at each iteration of optim()?
I am trying to maximise a complicated loglikelihood function with the "optim" command. Is there some way to get to know the estiamtes at each iteration? When I put "control=list(trace=TRUE)" as an option in "optim", I just got the initial and final values of the loglikelihood, number of iterations and whether the routine has converged or not. I need to know the
2009 Apr 29
2
Optim and hessian
Hi, my name is Marcel R. Lopes. My problem is, I made a code to calculate the estimates of a Cox model with random effects. Used to optimize the R command for this. The estimates were calculated correctly, but the Hessian matrix does not have good values. The same thing was done in SAS and gave good results for the Hessian Matrix. Where is the problem in R? As the Hessian is calculated?. How
2007 Oct 17
3
Multi-objective optimization
Dear All, Is there any package to do multi-objective optimization? For instance, consider the following problem: maximize f(x,y) in order to x and maximize g(x,y) in order to y, simultaneously, with x and y being the same both for f and g. Can R do it numerically? Thanks in advance, Paul
2008 Oct 02
1
In the OPTIM message....
Dear all When I used the method, L-BFGS-B, in OPTIM, I've got the following message. --------------------------------------------------------------------- $par [1] 0.176166426835580 $value [1] 1322.17600079332 $counts function gradient 8 8 $convergence [1] 0 $message [1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH" $hessian [,1] [1,]
2009 Nov 03
1
Passing Command to Optim in factanal
Hi, I am currently trying to execute the following command: f<-factanal(factors=k$Components$nparallel,covmat=m,n.obs=2287,rotation="varimax",control=list(opt=list(method=c("BFGS")))) but keep getting the error: L-BFGS-B needs finite values of 'fn' I can't figure out what I am doing wrong here, why isn't optim being told to use BFGS instead of L-BFGS-B...
2009 May 26
1
optim() question
I've seen with other software the capability for the optimizer to switch algorithms if it is not making progress between iterations. Is this capability available in optim()? Thanks, Stephen Collins, MPP | Analyst Health & Benefits | Aon Consulting [[alternative HTML version deleted]]
2010 Jan 12
3
optim: abnormal termination in lnsrch (resend)
[sorry, forgot some details...] I'm using optim(param, fun, method='L-BFGS-B', lower=lo, upper=up) to minimize a certain function. Often the minimization ends with the message: ERROR: ABNORMAL_TERMINATION_IN_LNSRCH What is optim() trying to say? What have I to change in my function to make the minimization succeed? Do you think using BBoptim() instead of optim() changes anything?
2009 Feb 12
1
Optim
Dear R user I follow the steps defined in Modern applied statistics page(453) to use optim. However, when I run the following code the parameters seems way off and the third parameter(p3) stayed as the initial value. below is the code: ## data da=c(418,401,416,360,411,425,537,379,484,388,486,380,394,363,405,383,392,363,398,526) ### initial values pars=c(392.25, 507.25, 0.80)
2007 May 10
2
Nonlinear constrains with optim
Dear All I am dealing at the moment with optimization problems with nonlinear constraints. Regenoud is quite apt to solve that kind of problems, but the precision of the optimal values for the parameters is sometimes far from what I need. Optim seems to be more precise, but it can only accept box-constrained optimization problems. I read in the list archives that optim can also be used with
2008 Apr 02
3
Fwd: Re: Nonlinear equation
> > >From: robert-mcfadden w o2.pl > > >Date: 2008/04/02 Wed AM 09:58:28 CDT > > >To: r-help w r-project.org > > >Subject: [R] Nonlinear equation > > > > hi: you need to give an example and details or > > you won't get much response, if any. Equation e.g. (A, B are known constants): 3log(gamma(x))-log(gamma(x)*gamma(2x))+(x-1)*A+B=0
2009 Oct 15
4
Generating a stochastic matrix with a specified second dominant eigenvalue
Hi, Given a positive integer N, and a real number \lambda such that 0 < \lambda < 1, I would like to generate an N by N stochastic matrix (a matrix with all the rows summing to 1), such that it has the second largest eigenvalue equal to \lambda (Note: the dominant eigenvalue of a stochastic matrix is 1). I don't care what the other eigenvalues are. The second eigenvalue is
2009 Apr 07
1
get optim results into a model object
Hello all, I have an optimization routine that is giving me good results, but the results are not in the nice "model" format like "lm". How can I get optim results into a model so that I can use the clever 'fitted', 'residuals', and 'summary' functions? Using optim is the only way that I was able to make a model that 1) sums the betas to 1, 2)
2009 Apr 15
2
issue with L-BFGS-B in optim (optim just hangs)
Dear R-Help List, I am using optim, with method=L-BFGS-B, to maximize a likelihood inside a large simulation exercise. This runs fine for most simulated data sets, but for some reason, about 1 out of 100 times, optim will just hang. Using a dumb approach to the problem (i.e. printing the parameter values each time the function being maximized is evaluated), I tracked down when this happens,
2006 Nov 29
2
How to solve differential equations with a delay (time lag)?
Hi, I would like to solve a system of coupled ordinary differential equations, where there is a delay (time lag) term. I would like to use the "lsoda" function "odesolve" package. However, I am not sure how to specify the delay term using the syntax allowed by odesolve. Here is an example of the kind of problem that I am trying to solve: > library(odesolve)