similar to: question about nlminb

Displaying 20 results from an estimated 20000 matches similar to: "question about nlminb"

2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
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
2012 Sep 26
2
non-differentiable evaluation points in nlminb(), follow-up of PR#15052
This is a follow-up question for PR#15052 <http://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15052> There is another thing I would like to discuss wrt how nlminb() should proceed with NAs. The question is: What would be a successful way to deal with an evaluation point of the objective function where the gradient and the hessian are not well defined? If the gradient and the hessian both
2006 Mar 16
1
lme4/Matrix: Call to .Call("mer_update_y"...) and LMEoptimize gives unexpected side effect...
Dear all I want to compute Monte Carlo p-values in lmer-models based on sampled data sets. To speed up calculations, I've tried to use internal functions from the Matrix package (as suggested ealier on the list by Doug Bates). So I did: fm2 <- lmer(resistance ~ ET + position + (1|Grp), Semiconductor,method='ML') simdata<-simulate(fm2,nsim=1) ynew <- simdata[,1] mer
2012 Oct 10
1
"optim" and "nlminb"
#optim package estimate<-optim(init.par,Linn,hessian=TRUE, method=c("L-BFGS-B"),control = list(trace=1,abstol=0.001),lower=c(0,0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,1,1,1,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf)) #nlminb package estimate<-nlminb(init.par,Linn,gr=NULL,hessian=TRUE,control =
2009 Feb 12
1
Setting optimizer in lme
I am using R 2.7.0 on a linux platform. I am trying to reproduce a 2002 example using lme from the nlme library. I want to change the otimizer from the default (nlminb) to optim. Specifically, this is what I am trying to do: R> library(nlme) R> library(car) # for data only R> data(Blackmoor) # from car R> Blackmoor$log.exercise <- log(Blackmoor$exercise + 5/60, 2) R>
2010 Mar 24
1
vcov.nlminb
Hello all, I am trying to get the variance-covariance (VCOV) matrix of the parameter estimates produced from the nlminb minimizing function, using vcov.nlminb, but it seems to have been expunged from the MASS library. The hessian from nlminb is also producing NaNs, although the estimates seems to be right, so I can't VCOV that way either. I also tried using the vcov function after minimizing
2005 May 27
2
nlminb to optmin
Hi! I want to convert S-Plus 6.2 code to R 2.1.0. Instead of the function nlminb I use the function optmin optmin(start,fn,gr,method="L-BFGS-B", lower, upper, hess,...) But then I get the Error in optmin ...: L-BFGS-B needs finite values of fn Then I used optmin(start,fn,gr,method="BFGS", hess, ...) But then I get the Error in optmin ...: initial value in vmmin is not
2008 May 15
1
logistic transformation using nlminb
Dear all, I want to find the optimal values of a vector, x (with 6 elements) say, satisfying the following conditions: 1. for all x>=0 2. sum(x)=1 3. x[5]<=0.5 and x[6]<=0.5 For the minimisation I'm using nlminb and to satisfy the first 2 conditions the logistic transformation is used with box constraints for condition 3. However, I don't seem to be able to get the values x
2005 Dec 04
1
Understanding nonlinear optimization and Rosenbrock's banana valley function?
GENERAL REFERENCE ON NONLINEAR OPTIMIZATION? What are your favorite references on nonlinear optimization? I like Bates and Watts (1988) Nonlinear Regression Analysis and Its Applications (Wiley), especially for its key insights regarding parameter effects vs. intrinsic curvature. Before I spent time and money on several of the refences cited on the help pages for "optim",
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
2009 May 06
2
NLMINB() produces NaN!
I am having the same problem as one Rebecca Sela(see bellow). On 21/12/2007 12:07 AM, Rebecca Sela wrote: >* I am trying to optimize a likelihood function using NLMINB. After running without a problem for quite a few iterations (enough that my intermediate output extends further than I can scroll back), it tries a vector of parameter values NaN. This has happened with multiple Monte Carlo
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,
2012 Nov 22
1
Optimizing nested function with nlminb()
I am trying to optimize custom likelyhood with nlminb() Arguments h and f are meant to be fixed. example.R: compute.hyper.log.likelyhood <- function(a, h, f) { a1 <- a[1] a2 <- a[2] l <- 0.0 for (j in 1:length(f)) { l <- l + lbeta(a1 + f[j], a2 + h - f[j]) - lbeta(a1, a2) } return(l) } compute.optimal.hyper.params <- function(start, limits, h_, f_) { result
2009 Jul 02
2
constrained optimisation in R.
i want to estimate parameters with maximum likelihood method with contraints (contant numbers). for example sum(Ai)=0 and sum(Bi)=0 i have done it without the constraints but i realised that i have to use the contraints. Without constraints(just a part-not complete): skellamreg_LL=function(parameters,z,design) { n=length(z); mu=parameters[1]; H=parameters[2]; Apar=parameters[3:10];
2006 Apr 20
2
nlminb( ) : one compartment open PK model
All, I have been able to successfully use the optim( ) function with "L-BFGS-B" to find reasonable parameters for a one-compartment open pharmacokinetic model. My loss function in this case was squared error, and I made no assumptions about the distribution of the plasma values. The model appeared to fit pretty well. Out of curiosity, I decided to try to use nlminb( ) applied to a
2004 Feb 24
2
convergence in polr
Hello splus-users, I am trying to fit a regression model for an ordered response factor. So I am using the function polr in library(MASS). My data is a matrix of 1665 rows and 63 columns (one of the column is the dependent variable). The code I use is polr(as.ordered(q23p)~.,data=newdatap) but I am getting the following warning message singularity encountered in: nlminb.1(temp, p, liv, lv,
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
2005 Dec 14
2
suggestions for nls error: false convergence
Hi, I'm trying to fit some data using a logistic function defined as y ~ a * (1+m*exp(-x/tau)) / (1+n*exp(-x/tau) My data is below: x <- 1:100 y <- c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,1,1,2,2,2,2,2,3,4,4,4,5, 5,5,5,6,6,6,6,6,8,8,9,9,10,13,14,16,19,21, 24,28,33,40,42,44,50,54,69,70,93,96,110,127,127,141,157,169,
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