Displaying 20 results from an estimated 1000 matches similar to: "hessian fails for box-constrained problems when close to boundary?"
2006 Nov 01
2
Hessian matrix
Dear all R users,
Is there any way to calculate hessian matrix of a given function at any
given point?
Regards
[[alternative HTML version deleted]]
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",
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
2009 Nov 02
1
need help in using Hessian matrix
Hi
I need to find the Hessian matrix for a complicated function from a certain
kind of data but i keep getting this error
Error in f1 - f2 : non-numeric argument to binary operator
the data is given by
U<-runif(n)
Us<-sort(U)
tau1<- 2
F1tau<- pgamma((tau1/theta1),shape,1)
N1<-sum(Us<F1tau)
X1<- Us[1:N1]
2009 Dec 15
2
Reconstruct a dataset
Dear all,
I have a dataset that looks like this:
inividual var1 var2 ?
1 1 1 ?
2 1 2 ?
3 2 1 ?
4 2 2 ?
? ? ? ?
I will random sample 2 individuals from this dataset based on a set of
random numbers, e.g.,
rn1 <- c(0, 0, 1, 1), rn2 <- c(0, 0, 2, 0), rn3 <- c(1, 0, 0, 1), rn4 <-
2008 Jan 26
1
Any numeric differentiation routine in R for boundary points?
Hi, I have a scalar valued function with several variables. One of the
variables is restricted to be non-negative. For example,
f(x,y)=sqrt(x)*exp(y), then x should be non-negative. I need the
gradient and hessian for some vector (0,y), i.e., I need the gradient and
hessian at the boudary of parameter space.
The "numderiv" package does not work, even for f(x)=sqrt(x), if you
do
2006 Jul 25
1
HELP with NLME
Hi,
I was very much hoping someone could help me with the following.
I am trying to convert some SAS NLMIXED code to NLME in R (v.2.1),
but I get an error message. Does anyone have any suggestions?
I think my error is with the random effect "u" which seems to be
parametrized differently in the SAS code. In case it's helpful,
what I am essentially trying to do is estimate parameters
2013 Nov 01
2
computation of hessian matrix
below is a code to compute hessian matrix , which i need to generate 29 number of different matrices for example first element in x1 and x2 is use to generate let say matrix (M1) and second element in x1 and x2 give matrix (M2) upto matrix (M29) corresponding to the total number of observations and b1 and b2 are constant.
can some one guide me or help to implement this please. I did not
2010 Sep 21
5
Can ucminf be installed in 64 bit R and one more question?
Hey, R Users
my windows is 64 bit windows 7.?I am trying to install the package ucminf into
my 64 bit version R but cannot.??the package I downloaded is from
http://cran.r-project.org/web/packages/ucminf/index.html?and I installed it with
the "install from local zip files", due to I did not connect my computer to
internet.
did anyone meet this problem and is there a version of
2010 Nov 06
1
saddle points in optim
Hi,
I've been trying to use optim to minimise least squares for a
function, and then get a guess at the error using the hessian matrix
(calculated from numDeriv::hessian, which I read in some other r-help
post was meant to be more accurate than the hessian given in optim).
To get the standard error estimates, I'm calculating
sqrt(diag(solve(x))), hope that's correct.
I've found
2000 Mar 17
1
optim: problem with additional arguments (PR#493)
The R function "optim" fails when a function requires additional
arguments, if the option "hessian=T" is specified. I am using R Version
1.0.0 on Windows 98.
Here is an example of the Rosenbrock Banana function from the optim help
example, with the function and gradient modified to take an additonal
argument. Note that the call to optim works fine unless a hessian is
2008 May 12
1
hessian in constrained optimization (constrOptim)
Dear helpers,
I am using the function "constrOptim" to estimate a model with ML with an
inequality constraint using the option method='Nelder-Mead'.
When I specify the option: hessian = TRUE I obtain the response:
Error in f(theta, ...) : unused argument(s) (hessian = TRUE)
I guess the function "constrOptim" does not allow this argument which, on
the other hand, is
2007 Jun 26
2
fisher information matrix
Hi All,
a colleague wants to calculate the Fisher information matrix for a model he
wrote (not in R). He can easily get the neg-log-likelihood and the best fit
parameters at the minimum. He can also get negLLs for other parameter values too.
Given these data, is there a way in R to calculate the Fisher information matrix?
Best,
Federico
--
Federico C. F. Calboli
Department of Epidemiology
2012 Aug 31
3
fitting lognormal censored data
Hi ,
I am trying to get some estimator based on lognormal distribution when we have left,interval, and right censored data. Since, there is now avalible pakage in R can help me in this, I had to write my own code using Newton Raphson method which requires first and second derivative of log likelihood but my problem after runing the code is the estimators were too high. with this email ,I provide
2012 Feb 01
3
Probit regression with limited parameter space
Dear R helpers,
I need to estimate a probit model with box constraints placed on several of
the model parameters. I have the following two questions:
1) How are the standard errors calclulated in glm
(family=binomial(link="probit")? I ran a typical probit model using the
glm probit link and the nlminb function with my own coding of the
loglikehood, separately. As nlminb does not
2018 Apr 04
1
parfm unable to fit models when hazard rate is small
Hello, I would like to use the parfm package: https://cran.r-project.org/web/packages/parfm/parfm.pdfhttps://cran.r-project.org/web/packages/parfm/parfm.pdf in my work. This package fits parametric frailty models to survival data. To ensure I was using it properly, I started by running some small simulations to generate some survival data (without any random effects), and analyse the data using
2010 Jun 25
1
Different standard errors from R and other software
Hi all,
Sorry to bother you. I'm estimating a discrete choice model in R using
the maxBFGS command. Since I wrote the log-likelihood myself, in order to
double check, I run the same model in Limdep. It turns out that the
coefficient estimates are quite close; however, the standard errors are very
different. I also computed the hessian and outer product of the gradients in
R using the
2016 Apr 06
1
Optimization max likelihood problem
hello all,
I am getting wrong estimates from this code. do you know what could be the problem.
thanks
x<- c(1.6, 1.7, 1.7, 1.7, 1.8, 1.8, 1.8, 1.8)
y <- c( 6, 13, 18, 28, 52, 53, 61, 60)
n <- c(59, 60, 62, 56, 63, 59, 62, 60)
DF <- data.frame(x, y, n)
# note: there is no need to have the choose(n, y) term in the likelihood
fn <- function(p, DF) {
z <- p[1]+p[2]*DF$x
2018 May 28
0
to R Core T: mle function in 32bits not respecting the constrain
> On May 27, 2018, at 10:31 PM, francesc badia roca <fbr600 at gmail.com> wrote:
>
> I have an issue using mle in versions of 32 bits.
>
> I am writing a package which I want to submit to the CRAN.
> When doing the check, there is an example that has an error running in the
> 32 bits version.
>
> The problem comes from the mle function, using it with a lower