similar to: Control parameter of the optim( ): parscale

Displaying 20 results from an estimated 2000 matches similar to: "Control parameter of the optim( ): parscale"

2008 Jul 23
1
mle2(): logarithm of negative pdfs
Hi, In order to use the mle2-function, one has to define the likelihood function itself. As we know, the likelihood function is a sum of the logarithm of probability density functions (pdf). I have implemented myself the pdfs that I am using. My problem is, that the pdfs values are negative and I cann't take the logarithm of them in the log-likelihood function. So how can one take the
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
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
2003 Jul 16
2
numerical differentiation in R? (for optim "SANN" parscale)
Dear R users, I am running a maximum likelihood model with optim. I chose the simulated annealing method (method="SANN"). SANN is not performing bad, but I guess it would be much more effecive if I could set the `parscale' parameter. The help sais: `parscale' A vector of scaling values for the parameters. Optimization is performed on `par/parscale' and these
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
2008 Aug 18
2
Call a Fortran subroutine with R: R crashes
Hello, I am trying to call a FORTRAN subroutine within R and something really strange happens: I have a dll-library, that I load with dyn.load('mpbvv.dll'). I have checked the [Ordinal/Name Pointer] Table for the function within the library that I want to call - it is there (objdump - p mpbvv.dll). Then, I have written an R-wrapper to call the FORTRAN subroutine, which works fine. SInce
2011 Apr 04
1
Clarks 2Dt function in R
Dear Ben, you answerd to Nancy Shackelford about Clarks 2Dt function. Since the thread ended just after your reply, I would like to ask, if you have an idea how to use this function in R I defined it the following way: function(x , p, u) { (p/(pi*u))*(1+(x^2/u))^(p+1) } and would like to fit this one to my obeservational data (count) [,1] [,2] [1,] 15 12 [2,] 45 13 [3,]
2009 Aug 04
1
parameter asterisks
Hello, Is there a clearcut answer as to why R prints 'NA' sometimes instead of standard errors? mle2(minuslogl = nlikfun4, start = list(a = 1, c = 1, d = 0.2, b = 0.1, b1 = 0.1), method = "Nelder-Mead") Coefficients: Estimate Std. Error z value Pr(z) a 3.83845751 0.47320236 8.1117 4.993e-16 *** c 0.95545367 NA NA NA d -0.22509015 NA NA NA b 0.04260199 0.00743892 5.7269
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",
2008 Jun 19
1
Optim() violates constraints
Hi, I am using the mle2 method of the package 'bbmle'. The method is calling as far as I understood it the optim method "L-BFGS-B" (this is the method I use). The latter one allows the user to impose box constraints on the variables, i.e. to give lower and upper bounds. It is important that the initial values satisfy the constraints. In my problem, it is the case. I do not know
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
2012 Oct 05
2
problem with convergence in mle2/optim function
Hello R Help, I am trying solve an MLE convergence problem: I would like to estimate four parameters, p1, p2, mu1, mu2, which relate to the probabilities, P1, P2, P3, of a multinomial (trinomial) distribution. I am using the mle2() function and feeding it a time series dataset composed of four columns: time point, number of successes in category 1, number of successes in category 2, and
2006 May 01
1
Problem with optim()
I am having a problem with optim() using the "L-BFGS-B" method. When I set the lower limit for the third parameter equal to zero I get an error message: > low.lim.3 <- 0 > phi_opt <- optim(phi_, model_lik, NULL, method = "L-BFGS-B", lower=c(0.2, -100, low.lim.3, 0), upper= c(10, 100, 10, 10), control = list(maxit = 1000, parscale = c(0.2, u1, 0.002, 0.002), trace =
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
2006 Jun 23
1
How to use mle or similar with integrate?
Hi I have the following formula (I hope it is clear - if no, I can try to do better the next time) h(x, a, b) = integral(0 to pi/2) ( ( integral(D/sin(alpha) to Inf) ( ( f(x, a, b) ) dx ) dalpha ) and I want to do an mle with it. I know how to use mle() and I also know about integrate(). My problem is to give the parameter values a and b to 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
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,
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,
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