Displaying 20 results from an estimated 7000 matches similar to: "``nlm(.) with derivatives''"
1997 Nov 21
2
R-alpha: nlm and gradients
At present the documentation for nlm refers the reader to Dennis and
Schnabel for details on the algorithms. It also states that the
function is liable to change.
Can anyone tell me if the current version of nlm uses only function
values or if it can use gradients and Hessians when they are
available? I would like to get an idea of how difficult it would be
to port the development versions of
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",
2003 Oct 17
2
nlm, hessian, and derivatives in obj function?
I've been working on a new package and I have a few questions regarding the
behaviour of the nlm function. I've been (for better or worse) using the nlm
function to fit a linear model without suppling the hessian or gradient
attributes in the objective function. I'm curious as to why the nlm requires
31 iterations (for the linear model), and then it doesn't work when I try to
add
1999 Nov 24
1
nlm continued
OK I figured it out. The attributes have to be on the value returned,
not on the function itself.
I tried a linear (not log linear) regression with Poisson, using
only the gradient, not the hessian. It took one extra iteration (13
instead of 12) and gave twice as many warnings (28 instead of 16)
compared to not supplying the gradient. The answers are identical to 5
decimal places.
Sorry to
2007 Mar 02
2
nlm() problem : extra parameters
Hello:
Below is a toy logistic regression problem. When I wrote my own code,
Newton-Raphson converged in three iterations using both the gradient
and the Hessian and the starting values given below. But I can't
get nlm() to work! I would much appreciate any help.
> x
[1] 10.2 7.7 5.1 3.8 2.6
> y
[1] 9 8 3 2 1
> n
[1] 10 9 6 8 10
derfs4=function(b,x,y,n)
{
2017 Mar 03
2
Bug in nlm()
Dear all,
I have found a bug in nlm() and would like to submit a report on this.
Since nlm() is in the stats-package, which is maintained by the R Core team, bug reports should be submitted to R's Bugzilla. However, I'm not a member of Bugzilla. Could anyone be so kind to add me to R's Bugzilla members or let me know to whom I should send the bug report?
Thank you in advance.
Kind
2003 Oct 24
1
first value from nlm (non-finite value supplied by nlm)
Dear expeRts,
first of all I'd like to thank you for the
quick help on my last which() problem.
Here is another one I could not tackle:
I have data on an absorption measurement which I want to fit
with an voigt profile:
fn.1 <- function(p){
for (i1 in ilong){
ff <- f[i1]
ex[i1] <- exp(S*n*L*voigt(u,v,ff,p[1],p[2],p[3])[[1]])
}
sum((t-ex)^2)
}
out <-
2001 Nov 25
2
another optimization question
Dear R list members,
Since today seems to be the day for optimization questions, I have one that
has been puzzling me:
I've been doing some work on sem, my structural-equation modelling package.
The models that the sem function in this package fits are essentially
parametrizations of the multinormal distribution. The function uses optim
and nlm sequentially to maximize a multinormal
2006 Nov 10
1
Variable limit in nlm?
Admittedly I am using an old version 1.7.1, but can anyone tell if this
is or was a problem. I can only get nlm (nonlinear minimization) to
adjust the first three components of function variable. No gradient or
hessian is supplied. E.G.;
fnoise
function(y) { y[5]/(y[4]*sp2) * exp(-((x[,3]-y[1]-y[2]*x[,1]-y[3]
*x[,2])/y[4])^2/2) + (1-y[5])/(y[9]*sp2) * exp(-((x[,3]-y[6]-y[7]*x[,1]-y[8]
2007 Sep 16
1
Problem with nlm() function.
In the course of revising a paper I have had occasion to attempt to
maximize a rather
complicated log likelihood using the function nlm(). This is at the
demand of a referee
who claims that this will work better than my proposed use of a home-
grown implementation
of the Levenberg-Marquardt algorithm.
I have run into serious hiccups in attempting to apply nlm().
If I provide gradient and
2002 Jul 22
2
typsize and fscale arguments to nlm
Dear R list members,
I have a question about the proper use of the typsize and fscale arguments
to nlm.
I use nlm in my sem package to fit general structural-equation models,
which entails maximizing a multinormal likelihood with respect to
parameters that represent regression coefficients and covariances of
variables. The magnitudes of these parameters can be very different.
The
2005 Oct 11
2
Sometimes having problems finding a minimum using optim(), optimize(), and nlm() (while searching for noncentral F parameters)
Hi everyone.
I have a problem that I have been unable to determine either the best
way to proceed and why the methods I'm trying to use sometimes fail. I'm
using the pf() function in an optimization function to find a
noncentrality parameter that leads to a specific value at a specified
quantile. My goal is to have a general function that returns the
noncentrality parameter that
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",
2009 Jan 29
1
Re : standard error of logit parameters
Run
outfit<-nlm(..., hessian=T) and then standards error are
se<-diag(solve(outfit$hessian))
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774
________________________________
De : Bomee Park <bombom@stanford.edu>
À : r-help@r-project.org
Envoyé le : Jeudi, 29 Janvier 2009, 4h01mn 56s
Objet : [R] standard error of logit parameters
Hi everyone.
I am now estimating the
2009 Apr 24
1
Sem and nlm and ols instead of ml
Dear colleagues,
Has anybody any experience using the sem package to fit structural
equation models using a fitting function other than ML? I have heard tell
that OLS may provide better estimates when using standardized matrices
generated from small sample sizes, so I was interested in comparing the two
for a few models. However, ML appears to be hard-coded into the source for
sem...but maybe
2009 Jul 01
2
Difficulty in calculating MLE through NLM
Hi R-friends,
Attached is the SAS XPORT file that I have imported into R using following code
library(foreign)
mydata<-read.xport("C:\\ctf.xpt")
print(mydata)
I am trying to maximize logL in order to find Maximum Likelihood Estimate (MLE) of 5 parameters (alpha1, beta1, alpha2, beta2, p) using NLM function in R as follows.
# Defining Log likelihood - In the function it is noted as
2011 Aug 24
1
problema de selección de valores iniciales en nlm
Hola a todos,
Necesito estimar dos parametros utilizando la función nlm;
fit<-nlm(hood2par,c(x01[i],x02[j]),iterlim=300, catch=x[,c(3,4,5)],sp=.5)
donde hood2par es una logística modificada.
Pero en mi caso, la convergencia de nlm depende de los valores
iniciales de dichos parámetros. Para buscar dichos valores iniciales de
manera automática, genero dos vectores de valores iniciales
2000 Mar 06
1
nlm and optional arguments
It would be really nice if nlm took a set of "..." optional arguments
that were passed through to the objective function. This level of hacking
is probably slightly beyond me: is there a reason it would be technically
difficult/inefficient? (I have a vague memory that it used to work this
way either in S-PLUS or in some previous version of R, but I could easily
be wrong.)
Here's
2004 Oct 11
1
nlm question
Dear R People:
I am trying to duplicate the example from Dennis and Schnabel's "Numerical
Methods for Unconstrained Optimization and Nonlinear Equations", which
starts on page 149.
My reason for doing so: to try to understand the "nlm" function.
Here is the function:
>mfun1
function(x) {
z <- matrix(0,nrow=2,ncol=1)
z[1,1] <- x[1]^2 + x[2]^2 -
2004 Aug 25
3
Beginners Question: Make nlm work
Hello,
I'm new to this and am trying to teach myself some R by plotting
biological data. The growth curve in question is supposed to be fitted
to the Verhulst equation, which may be transcribed as follows:
f(x)=a/(1+((a-0.008)/0.008)*exp(-(b*x)))
- for a known population density (0.008) at t(0).
I am trying to rework the example from "An Introduction to R" (p. 72)
for my case and