Displaying 20 results from an estimated 10000 matches similar to: "Optim parscale?"
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
2009 Mar 06
0
modifying a built in function from the stats package (fixing arima) (CONCLUSIONS)
Thanks a lot to everybody that helped me out with this.
Conclusions:
(1)
In order to edit arima in R:
>fix(arima)
or alternatively:
>arima<-edit(arima)
(2)
This is not contained in the "Introduction to R" manual.
(3)
A "productive" fix of arima is attached (arma coefficients printed out and
error catched so that it doesn't halt parent loops to search for
2015 May 21
0
Fix for bug in arima function
>>>>> peter dalgaard <pdalgd at gmail.com>
>>>>> on Thu, 21 May 2015 11:03:05 +0200 writes:
> On 21 May 2015, at 10:35 , Martin Maechler <maechler at lynne.stat.math.ethz.ch> wrote:
>>>
>>> I noticed that the 3.2.1 release cycle is about to start. Is there any
>>> chance that this fix will make it into
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
2015 May 21
0
Fix for bug in arima function
> I noticed that the 3.2.1 release cycle is about to start. Is there any
> chance that this fix will make it into the next version of R?
>
> This bug is fairly serious: getting the wrong variance estimate leads to
> the wrong log-likelihood and the wrong AIC, BIC etc, which can and does
> lead to suboptimal model selection. If it's not fixed, this issue will
> affect
2008 Feb 08
0
scaling and optim
?optim says, in describing the control parameter,
'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
'fn(par)/fnscale'.
'parscale' A vector of scaling values for the parameters.
2015 May 20
2
Fix for bug in arima function
I noticed that the 3.2.1 release cycle is about to start. Is there any
chance that this fix will make it into the next version of R?
This bug is fairly serious: getting the wrong variance estimate leads to
the wrong log-likelihood and the wrong AIC, BIC etc, which can and does
lead to suboptimal model selection. If it's not fixed, this issue will
affect every student taking our time series
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
2015 May 21
2
Fix for bug in arima function
On 21 May 2015, at 10:35 , Martin Maechler <maechler at lynne.stat.math.ethz.ch> wrote:
>>
>> I noticed that the 3.2.1 release cycle is about to start. Is there any
>> chance that this fix will make it into the next version of R?
>>
>> This bug is fairly serious: getting the wrong variance estimate leads to
>> the wrong log-likelihood and the wrong
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 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
2015 May 21
3
Fix for bug in arima function
On 21 May 2015, at 12:49 , Martin Maechler <maechler at lynne.stat.math.ethz.ch> wrote:
>>>>>> peter dalgaard <pdalgd at gmail.com>
>>>>>> on Thu, 21 May 2015 11:03:05 +0200 writes:
>
>> On 21 May 2015, at 10:35 , Martin Maechler <maechler at lynne.stat.math.ethz.ch> wrote:
>
>>>>
>>>> I noticed that
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,
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",
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
2003 Dec 08
2
test for arima coef's significancy
Dear sirs,
I would like to know if there is a function to compute the pvalue for the
significancy of arima coef in an arima object created by
the arima function.
I have written this one:
pvalueArima<-function(x,arima)
{
t<-(arima$coef)/(diag(arima$var.coef)^0.5)
df<-length(x)-length(arima$coef)
1-pt(t,df)
}
Has somebody already implemented something equivalent ?
thank you for your
2009 Jun 05
1
Bug in print.Arima and patch
Dear List,
A posting to R-Help exposed this problem with the print method for
objects of class Arima:
> set.seed(1)
> x <- arima.sim(n = 100, list(ar = 0.8897, ma = -0.2279))
> mod <- arima(x, order = c(1,0,1))
> coefs <- coef(mod)
> mod2 <- arima(x, order = c(1,0,1), fixed = coefs)
> mod2
Call:
arima(x = x, order = c(1, 0, 1), fixed = coefs)
Coefficients:
Error
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 =
2010 Nov 09
0
convergence message & SE calculation when using optim( )
Hi R-users,
I am trying to estimate function parameters using optim(). My count
observations follows a Poisson like distribution. The problem is that I
wanna express the lambda coefficient, in the passion likelihood
function, as a linear function of other covariates (and thus of other
coefficients). The codes that I am using (except data frame) are the
following (FYI the parameters need to be