Displaying 20 results from an estimated 2000 matches similar to: "function optimization"
2011 Jul 23
1
Extend my code to run several data at once.
Hi
I have a code that calculate maximisation using optimx and it is working
just fine. I want to extend the code to run several colomns of R_j where j
runs from 1 to 200. If I am to run the code in its current state, it means I
will have to run it 200 times manually. May you help me adjust it to
accomodate several rows of R_j and print the 200 results.
***Please do not get intimidated by the
2011 Aug 29
3
gradient function in OPTIMX
Dear R users
When I use OPTIM with BFGS, I've got a significant result without an error
message. However, when I use OPTIMX with BFGS( or spg), I've got the
following an error message.
----------------------------------------------------------------------------------------------------
> optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS",
>
2011 Dec 12
1
Detecting typo in function argument
With some chagrin after spending a couple of hours trying to debug a script, I realized I
had typed in something like
ans<-optimx(start, myfn, mygr, lower<-lo, upper=up)
that is, the "<-" rather than "=". The outcome on my machine was a non-obvious error
several layers deep in the call stack. For info, optim() seems to stop much more quickly.
The error is
2011 Aug 13
3
optimization problems
Dear R users
I am trying to use OPTIMX(OPTIM) for nonlinear optimization.
There is no error in my code but the results are so weird (see below).
When I ran via OPTIM, the results are that
Initial values are that theta0 = 0.6 1.6 0.6 1.6 0.7. (In fact true vales
are 0.5,1.0,0.8,1.2, 0.6.)
--------------------------------------------------------------------------------------------
>
2011 Feb 14
1
MCMC glmm
Hi to all the people,
I'm working with abundance data of some species, but containing too zero
values, and the factors are the ones typical in a BACI experiment
(Before-and-After-Control-Impact). Thus, these are two fixed factors. As the
data does not holds the normality and homogeneity of variances assumptions
of clasiccal ANOVA, I'm trying to fit a zero-altered model using the MCMC
glmm
2017 Dec 31
1
Order of methods for optimx
Dear R-er,
For a non-linear optimisation, I used optim() with BFGS method but it
stopped regularly before to reach a true mimimum. It was not a problem
with limit of iterations, just a local minimum. I was able sometimes to
reach better minimum using several rounds of optim().
Then I moved to optimx() to do the different optim rounds automatically
using "Nelder-Mead" and
2011 Sep 10
1
control list gotcha
This is mainly a reminder to others developing R packages to be careful not to supply
control list items that are not used by the called package. Optimx is a wrapper package
that aims to provide a common syntax to a number of existing optimization packages.
Recently in extending optimx package I inadvertently introduced a new control for optimx
which is NOT in any of the wrapped optimization
2011 Mar 19
2
problem running a function
Dear people,
I'm trying to do some analysis of a data using the models by Royle & Donazio
in their fantastic book, particular the following function:
http://www.mbr-pwrc.usgs.gov/pubanalysis/roylebook/panel4pt1.fn
that applied to my data and in the console is as follows:
> `desman.y` <- structure(c(3L,4L,3L,2L,1L), .Names = c("1", "2", "3",
2011 Feb 07
1
kernel density
Hi all (again),
many thanks for the answer to the optimization problem. All is fine now. The
problem now is with kernel estimators in sm. package. I do all the work and
the graphics good, but I need the density function data for each point, and
I don't know how to get it. The only thing I get is the table at the end of
the following sequence:
>
2016 Oct 09
1
optim(?, method=?L-BFGS-B?) stops with an error
I'll not copy all the previous material on this thread to avoid overload.
The summary is that all the methods Spencer has tried have some issues.
The bad news: This is not uncommon with optimization methods, in part because the problems are "hard",
in part because getting them implemented and linked to an interfacing approach like R is very tedious
and prone to omissions and
2019 Jan 31
1
nlminb with constraints failing on some platforms
Prof Nash, Prof Galanos
Is it possible to use a generic code stub in front of packages that use
optimx to improve optimx use or curtail it according to the requirements?
Best Regards
Amit
+91 7899381263
________________________________________________________________________
Please request Skype as available
5th Year FPM (Ph.D.) in Finance and Accounting Area
Indian Institute
2011 Nov 02
1
overly long lines in pdf output of manual from package
In re-factoring my optimx package, I'm finding that the pdf output has some lines that are
outside the margins (and there are warnings in R CMD check optimx). Clearly I can fix this
by editing the tex file that is generated, but the build infrastructure would still get
things wrong in automatic processing. So that gives rise to 3 questions:
1) How do I adjust the DESCRIPTION file to avoid too
2010 Jun 22
1
Subject: Re ZINB by Newton Raphson??
I have not included the previous postings because they came out very strangely on my mail
reader. However, the question concerned the choice of minimizer for the zeroinfl()
function, which apparently allows any of the current 6 methods of optim() for this
purpose. The original poster wanted to use Newton-Raphson.
Newton-Raphson (or just Newton for simplicity) is commonly thought to be the
2011 Nov 29
2
Parameters setting in functions optimization
Good afternoon everybody,
I'm quite new in functions optimization on R and, whereas I've read
lot's of function descriptions, I'm not sure of the correct settings for
function like "optimx" and "nlminb".
I'd like to minimize my parameters and the loglikelihood result of the
function.
My parameters are a mean distance of dispersion and a proportion of
2015 Apr 24
2
Title case in DESCRIPTION for package where a word is a function name
I was preparing a fix for a minor glitch in my optimx package and R CMD
check gave an error that the title was not in title case. It is
A Replacement and Extension of the optim() Function
R CMD check suggests the incorrect form
A Replacement and Extension of the Optim() Function
'Writing R Extensions' suggests single quotes, i.e.,
A Replacement and Extension of the 'optim()'
2011 Aug 13
1
Own R function doubt
Hi to all the people again,
I was writting a simply function in R, and wish to collect the results in a
excel file. The work goes as follows,
Ciervos<-function(K1, K0, A, R,M,Pi,Hembras)
{B<-(K1-K0)/A
T1<-(R*Pi*Hembras-M*Pi+B)/(Pi-M*Pi+R*Pi*Hembras)
P1<-Pi-B
R1<-P1*Hembras*R
M1<-P1*M
T2<-(R1-M1+B)/(P1-M1+R1)
P2<-P1-B
R2<-P2*Hembras*R
M2<-P2*M
2024 Nov 01
1
Fwd: OPTIMIZACIÓN
---------- Forwarded message ---------
De: Jose Betancourt Bethencourt <betanster en gmail.com>
Date: sáb, 26 oct 2024 a las 16:14
Subject: OPTIMIZACIÓN
To: <r-help-es-request en r-project.org>
Estimados
Corri este código y funciona todo bien , menos la ultima parte de
optimización apreciaria su ayuda
José
# Cargar bibliotecas necesarias
library(deSolve)
library(optimx)
#
2016 Oct 08
4
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hi, Mark et al.:
Thanks, Mark.
Three comments:
1. Rvmmin was one of the methods I tried after Ravi
directed me to optimx. It returned NAs for essentially everything. See
my email of this subject stamped 4:43 PM Central time = 21:43 UTC.
2. It would be interesting to know if the current
algorithm behind optim and optimx with
2012 Jan 12
2
Function accepted by optim but not mle2 (?)
Dear Sir/ Madam,
I'm having trouble de-bugging the following - which works perfectly
well with optim or optimx - but not with mle2.
I'd be really grateful if someone could show me what is wrong. Many
thanks in advance. JSC:
gompertz<- function (x,t=data)
{
a3<-x[1]
b3<-x[2]
shift<-data[1]
h.t<-a3*exp(b3*(t-shift))
2011 Aug 31
1
Gradients in optimx
Hi Reuben,
I am puzzled to note that the gradient check in "optimx" does not work for you. Can you send me a reproducible example so that I can figure this out?
John - I think the best solution for now is to issue a "warning" rather than an error message, when the numerical gradient is not sufficiently close to the user-specified gradient.
Best,
Ravi.