similar to: Hessian in box-constraint problem - concern OPTIM function

Displaying 20 results from an estimated 7000 matches similar to: "Hessian in box-constraint problem - concern OPTIM function"

2012 Nov 15
1
hessian fails for box-constrained problems when close to boundary?
Hi I am trying to recover the hessian of a problem optimised with box-constraints. The problem is that in some cases, my estimates are very close to the boundary, which will make optim(..., hessian=TRUE) or optimHessian() fail, as they do not follow the box-constraints, and hence estimate the function in the unfeasible parameter space. As a simple example (my problem is more complex though,
2008 Jan 26
5
double-click in RData file versus load( file )
hello all, when I start up the R and I execute o follow code: > ls() character(0) > x=123 > assign("test_x", x, envir = .GlobalEnv ) > ls() [1] "test_x" "x" > setwd('C:\\R\\etc') > save.image('TEST.RData') > q('no') I have two different behaviours: (a) - when I start up R again by "double click" in
2007 Feb 16
1
optim() and resultant hessian
R users; A question about optimization within R. I've been using both optim() and nlminb() to estimate parameters and all seems to be working fine. For context (but without getting into specifics - sorry), I'm working with a problem that is known to have correlated parameters, and parameter estimation can be difficult. I have a question on optim() - I'm using
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
2011 Sep 22
1
nlm's Hessian update method
Hi R-help! I'm trying to understand how R's nlm function updates its estimate of the Hessian matrix. The Dennis/Schnabel book cited in the references presents a number of different ways to do this, and seems to conclude that the positive-definite secant method (BFGS) works best in practice (p201). However, when I run my code through the optim function with the method as "BFGS",
2008 May 30
1
Get all X iterations in optim output when controls(trace=6)
Hi, I would like to get all X iterations in optim output in matrix form. I know about the follow approach: sink("reportOptim") optim( ......., control=list( trace=6,..........) ) sink() all_iterOptim <- readLines("reportOptim") unlink("reportOptim") all_iterOptim <- all_iterOptim[ grep( '^X', all_iterOptim ) ] ### TODO: the rest !!! :-) But it is very
2008 Dec 08
1
example of gladeXML - RGtk2
hello all, where I find a example or tutorial of RGtk2 package? I would like to know about the gladeXML functions in R. thanks in advance Cleber Borges
2013 Nov 19
2
Optim function & Hessian matrix
Dear R Users Hi, I have very emergency problems in my programming about finding MLE with optim command. I reproduced it with real data. I guess that my function object in optim is very sensitive because it has power function . Then optim give me lower or initial values for estimates with these warnings for Hessian matrix computation: 1: In log(B2 * (C2^(y + v))) : NaNs produced 2: In log(B3
2011 Sep 02
5
Hessian Matrix Issue
Dear All, I am running a simulation to obtain coverage probability of Wald type confidence intervals for my parameter d in a function of two parameters (mu,d). I am optimizing it using "optim" method "L-BFGS-B" to obtain MLE. As, I want to invert the Hessian matrix to get Standard errors of the two parameter estimates. However, my Hessian matrix at times becomes
2006 Mar 21
1
Hessian from optim()
Hello! Looking on how people use optim to get MLE I also noticed that one can use returned Hessian to get corresponding standard errors i.e. something like result <- optim(<< snip >>, hessian=T) result$par # point estimates vc <- solve(result$hessian) # var-cov matrix se <- sqrt(diag(vc)) # standard errors What is actually Hessian representing here?
2007 Oct 04
1
hessian matrix in arima
Hi, I am working or arima. I think arima uses non-linear optimisation for parameter optimisation. The standard error for parameters are computed from hessian matrix. When I use arima model, how can I see the finial hessian got from non-linear optimisation (BFGS for example). Any help is appreciated. Many thanks. Di [[alternative HTML version deleted]]
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
2007 May 29
1
Estimate Fisher Information by Hessian from OPTIM
Dear All, I am trying to find MLE by using "OPTIM" function. Difficult in differentiating some parameter in my objective function, I would like to use the returned hessian matrix to yield an estimate of Fisher's Information matrix. My question: Since the hessian is calculated by numerical differentiate, is it a reliable estimate? Otherwise I would have to do a lot of work to
2006 Aug 24
1
Optim question
This is a very basic question, but I am a bit confused with optim. I want to get the MLEs using optim which could replace the newton-raphson code I have below which also gives the MLEs. The function takes as input a vector x denoting whether a respondent answered an item correctly (x=1) or not (x=0). It also takes as input a vector b_vector, and these are parameters of test items (Rasch estimates
2008 Jun 18
1
Error in bugs.run -- R2WinBUGS
Hi, I tried to use MethComp library and this library make use of the WinBUGS by R2WinBuGUS, but I get the follow error in bugs.run: *Error in bugs.run(n.burnin, bugs.directory, WINE = WINE, useWINE = useWINE, : * Look at the log file and try again with 'debug=TRUE' to figure out what went wrong within Bugs. Anyone can help-me, please? Thanks Cleber library( MethComp ) library(
2011 Sep 27
2
Error in optim function.
I'm trying to calculate the maximum likelihood estimate for a binomial distribution. Here is my code: y <- c(2, 4, 2, 4, 5, 3) n <- length(y) binomial.ll <- function (pi, y, n) { ## define log-likelihood output <- y*log(pi)+(n-y)*(log(1-pi)) return(output) } binomial.mle <- optim(0.01, ## starting value binomial.ll,
2009 Dec 06
5
optim with constraints
Hi, dear R users I am a newbie in R and I wantto use the method of meximum likelihood to fit a Weibull distribution to my survival data. I use "optim" as follows: optim(c(1, 0.25),weibull.like,mydata=mydata,method="L-BFGS-B",hessian = TRUE) My question is: how do I setup the constraints so that the two parametrs of Weibull to be pisotive? Or should I use other function
2010 Sep 29
1
nlminb and optim
I am using both nlminb and optim to get MLEs from a likelihood function I have developed. AFAIK, the model I has not been previously used in this way and so I am struggling a bit to unit test my code since I don't have another data set to compare this kind of estimation to. The likelihood I have is (in tex below) \begin{equation} \label{eqn:marginal} L(\beta) = \prod_{s=1}^N \int
2003 Feb 10
1
Zero rows/cols in the hessian matrix
Dear R experts! I try to minimize a function with external C fitting function. I get the hessian matrix. Here it is: [,1] [,2] [,3] [,4] [1,] 1.8816631 0 0.8859803 0 [2,] 0.0000000 0 0.0000000 0 [3,] 0.8859803 0 0.4859983 0 [4,] 0.0000000 0 0.0000000 0 Second and fourth rows/columns have zero values only. That's OK, because that ones related
2008 Sep 12
1
Error in solve.default(Hessian) : system is computationally singular
Hello everyone, I'm trying to estimate the parameters of the returns series attached using the GARCH code below, but I get the following error message: Error in solve.default(Hessian) : system is computationally singular: reciprocal condition number = 0 Error in diag(solve(Hessian)) : error in evaluating the argument 'x' in selecting a method for function 'diag' Can