similar to: numerical differentiation in R? (for optim "SANN" parscale)

Displaying 20 results from an estimated 1000 matches similar to: "numerical differentiation in R? (for optim "SANN" parscale)"

2003 Jul 14
2
install problem
Dear R experts, I am in transition to the R system from other statistical systems I was using (SPSS, Statistica, etc.). I have used R for a few months on my Windows PC, but now I would like to install R on a Linux box with SuSE 8.1. I downloaded the RPM for SuSE 8.1 from the CRAN mirror. But when I run the INSTALL script using the midnight commander it gives the following error message: #
2003 Jul 14
2
special characters
Dear R-users, Some hours ago I successfully installed R 1.7.1 on my Linux computer (SuSE 8.1). Now I am trying to get my scripts work which I have written for R/Windows. * While with Windows I was able to use the vowels with the accents present in the Hungarian language: > d$crude.inc<-d$esetsz?m/d$?vk?zepi.l?leksz?m*1000000 > the same line leads to an error on Linux: >
2005 Apr 19
1
Optim(...parscale...)
Hi there, The optim(par, fn, ...parscale...) function in R requires 'parscale' which is defined as: "A vector of scaling values for the parameters. Optimisation is performed on 'par/parscale' and these should be comparable in the sense that a unit change in any element (??) produces a unit change in the scaled value". I am just not understanding the
2005 Apr 26
2
"wild" function example in optim
Dear all, Firstly, I do apologize if my question is simple and posted in the wrong place but I had no reply from the R-help mailing list (maybe it is too simple!). I was wondering why parscale is set to 20 in the "wild" function example used in ?optim. This function has only one parameter and if we set parscale equal to 1 then the solution near the global minimum is not found. I
2008 Jul 21
1
Control parameter of the optim( ): parscale
Hi everybody, I am using the L-BFGS-B method of the mle2() function to estimate the values of 6 parameters. mle2 uses the methods implemented in optim. As I got it from the descriptions available online, one can use the parscale parameter to tell R somehow what the values of the estimated parameters should be . . . Could somebody please help me understand what one has to do actually with the
2003 Jul 14
2
Hypothesis testing after optim
Hi folks: Does anyone know of a way to do (linear) hypothesis tests of parameters after fitting a maximum-likelihood model w/ optim? I can't seem to find anything like a Wald test whose documentation says it applies to optim output. Also, thanks again to everyone who gave me feedback on the robustness of ML estimation in R! Peter ********************************
2011 May 25
1
L-BFGS-B and parscale in optim()
Hi, When using method L-BFGS-B along with a parscale argument, should the lower and upper bounds provided be on the scaled or unscaled values? Thanks. Cheers, -- Seb
2008 Apr 05
2
How to improve the "OPTIM" results
Dear R users, I used to "OPTIM" to minimize the obj. function below. Even though I used the true parameter values as initial values, the results are not very good. How could I improve my results? Any suggestion will be greatly appreciated. Regards, Kathryn Lord #------------------------------------------------------------------------------------------ x = c(0.35938587,
2008 Apr 05
2
How to improve the "OPTIM" results
Dear R users, I used to "OPTIM" to minimize the obj. function below. Even though I used the true parameter values as initial values, the results are not very good. How could I improve my results? Any suggestion will be greatly appreciated. Regards, Kathryn Lord #------------------------------------------------------------------------------------------ x = c(0.35938587,
2009 Mar 02
0
Optim parscale?
I am not clear on what is happening with parscale in optim It seems that scaling the parameters will produce unpredictable results in a non-linear function (which is the purpose of optim right?) The documentation states: parscale A vector of scaling values for the parameters. Optimization is performed on par/parscale and these should be comparable in the sense that a unit change in any element
2008 May 16
0
How to determine sensible values for 'fnscale' and 'parscale' in optim
Dear R-help, I'm using the 'optim' functions to minimise functions, and have read the documentation, but I'm still not sure how to determine sensible values to use for the 'fnscale' and 'parscale' options. If I have understood everything correctly, 'fnscale' should be used to scale the objective function, so that for example if the default is
2009 Oct 20
1
Buglet in optim() SANN
I think SANN method in optim() is failing to report that it has not converged. Here is an example genrose.f<- function(x, gs=NULL){ # objective function ## One generalization of the Rosenbrock banana valley function (n parameters) n <- length(x) if(is.null(gs)) { gs=100.0 } fval<-1.0 + sum (gs*(x[1:(n-1)]^2 - x[2:n])^2 + (x[2:n] - 1)^2) return(fval) }
2008 Jan 18
1
constrOptim with method SANN
Hi Everyone, I'm trying to minimize a function using constrOptim with the simulated annealing method SANN. If I understand constrOptim well, it basically passes most of its arguments to optim while somehow enforcing the constraints. My problem is, that since SANN does not need gradients, when using optim with SANN, the gr argument of optim is used to specify a function to create the next
2008 Mar 23
2
scaling problems in "optim"
Dear R users, I am trying to figure out the control parameter in "optim," especially, "fnscale" and "parscale." In the R docu., ------------------------------------------------------ fnscale An overall scaling to be applied to the value of fn and gr during optimization. If negative, turns the problem into a maximization problem. Optimization is performed on
2011 Dec 16
1
optim with simulated annealing SANN for combinatorial optimization
Hi all I am trying to solve a combinatorial optimization problem. Basically, I can reduce my problem into the next problem: 1.- Given a NxN grid of points, with some values in each cell 2.- Find the combination of K points on the grid such that, the maximum mean value is obtained I took the Travel SalesMan problem example in ?optim documentation. I am not sure if I have understood correctly
2012 Aug 18
1
Parameter scaling problems with optim and Nelder-Mead method (bug?)
Dear all, I?m having some problems getting optim with method="Nelder-Mead" to work properly. It seems like there is no way of controlling the step size, and the step size seems to depend on the *difference* between the initial values, which makes no sense. Example: f=function(xy, mu1, mu2) { print(xy) dnorm(xy[1]-mu1)*dnorm(xy[2]-mu2) } f1=function(xy) -f(xy, 0,
2004 May 28
1
optim(method="SANN")
Hello List I'm working on a combinatoric problem in which the object is to minimize the badness() of a vector. I think this class of problem is only soluble by optim() using method=SANN. The badness() of anything is >= 0, and when I've found a solution with zero badness, I want optim() to stop (carrying on beyond zero badness cannot improve the solution). Efficiency is crucial here.
2008 Mar 16
1
optim: why is REPORT not used in SANN?
Hello, I wonder why the control parameter REPORT is not supported by method SANN. Looking into optim.c I found an internal constant: #define STEPS 100 ... and decreasing this to 10 helped me fine-tuning the annealing parameters in an actual problem. Is there any reason why not passing nREPORT to samin and setting something like: STEPS = nREPORT / tmax Thomas P. -- Thomas Petzoldt
2011 Aug 14
2
Scaling problem in optim()
I am using the function optim and I get the error message ABNORMAL_TERMINATION_IN_LNSRCH. Reason for this could be a scaling problem. Thus, I used parscale in order to scale the parameters. But I still have the error message. For example, with parscale=c(rep(1,n), 0.01,1,0.01): return(optim(c(mu1,b,k,phi), neg2loglikelihood, method = "L-BFGS-B",
2003 Dec 17
1
R demonstration ideas?
Dear All! Tomorrow morning I will have to demonstrate R to a professor here at the Semmelweis University. He uses Windows and Statistica. I will have 20 minutes and I would like to convince him that R is powerful, and it even could be used in teaching the students basic medical statistics. Could you give me some ideas what to show him in this 20 minutes? This night I will have about 1.5 hours