Displaying 20 results from an estimated 6000 matches similar to: "Nlm"
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
2013 Apr 26
2
Can a column of a list be called?
Hello Everyone,
I would like to know if I can call one of the columns of a list, to use it
as a variable in a function.
Thanks in advance for any advice!
Jana
--
Jana Makedonska,
B.Sc. Biology, Universite Paul Sabatier Toulouse III
M.Sc. Paleontology, Paleobiology and Phylogeny, Universite de Montpellier II
Ph.D. candidate in Physical Anthropology and Part-time lecturer
Department of
2013 Apr 26
2
Help with dataEllipse function
Hi Everyone,
I am working with the R function "dataEllipse". I plot the 95% confidence
ellipses for several different samples in the same plot and I color-code
the ellipse of each sample, but I do not know how to specify a different
line pattern for each ellipse. I can only modify the pattern for all
ellipses with the "lty" argument. Any help will be highly appreciated.
2003 Jan 23
2
Profile on optim/nlm
Greetings,
Before I reinvent the wheel has anyone done a profile function for a
fit using optim (or nlm)? (like the buggy profile.ms in S+) . It
seems a bit tricky as the function to be minimised has to have
arguments corresponding to the variables being fitted - which is one
less than the function provided to optim()... I guess you can create
another function on the fly somehow.
Cheers,
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 <-
2011 Dec 15
1
Inquiry about matrix pooling
Dear R-users,
I am a relatively new R user and I have a simple question. Is there a
command attached to a R function, which performs matrix pooling?
Thanks in advance,
Jana
--
--
"The world is full of mysteries. Life is one. The curious limitations of
finite minds are another."(J.B.S. Haldane, The Causes of Evolution)
Jana Makedonska, M.Sc.
Ph.D. candidate/ Part-time lecturer
2008 Mar 19
0
Error en nlm(logdgenexpn, p = c(vmomest[[1]], vmomest[[2]]), x = x.genexp, : valor no finito provisto por 'nlm'
Dear useRs,
I am analysing the behaviour of MLE for the two parameters of a kind
of exponential distribution, leaving as initial values the estimators
moments produced by the variation coefficient.
I do using simulations, giving them an accountant, r. But running my
codes remains a problem with the nlm function. To review details
wearing
On one of the lines put status
1999 Sep 29
1
nlm recursion problem
Hi
I am trying to use nlm with an additional call to nlm within the function
but after the first pass, the parameters to the outer call are being
passed to the inner call. The inner call is a very trivial problem.
ie:
test.outer<-function(param.outer){
slope<-nlm(test.inner,param.inner)
...
loglikelihood<-sum(...)
return(-loglikelihood)
}
and
nlm(test.outer,param.outer)
on the
1999 Nov 24
0
nlm gradient and hessian
Out of curiosity, I have tried, without success, to use the new
facility in nlm to specify the gradient and hessian. (It is many years
since I had a problem simple enough to make analytic derivation of
these worthwhile.) The help now says that the function must have
attributes with these names but gives no indication as to what should
be in the attributes. The online example and demo do not use
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
2010 Jun 15
1
Error in nlm : non-finite value supplied by 'nlm'
Hello,
I am trying to compute MLE for non-Gaussian AR(1). The error term follows a difference poisson distribution. This distribution has one parameter (vector[2]).
So in total I want to estimate two parameters: the AR(1) paramter (vector[1]) and the distribution parameter.
My function is the negative loglikelihood derived from a mixing operator.
f=function(vector)
2008 Oct 14
0
nlm return wrong function value - garch fitting
I am using nlm to maximize a likelihood function. When I call the likelihood
function (garchLLH) via nlm however, nlm returns the wrong value of the
function.
When I test the likelihood function manually I get the correct answer. I'm
probably doing something really stupid, maybe someone can point it out for
me.
###############this is the function i am trying to minimize ############
2003 Nov 17
0
gradient option in 'nlm' function
<FONT face="Default Sans Serif, Verdana, Arial, Helvetica, sans-serif" size=2><DIV>Dear list members,</DIV><DIV> </DIV><DIV>I am trying to use "nlm" function to maximize a mixture likelihood of beta densities. There are five unknown parameters in the likelihood. Since I can get the analytic gradient, I attach the "gradient"
2012 Oct 19
2
likelihood function involving integration, error in nlm
Dear R users,
I am trying to find the mle that involves integration.
I am using the following code and get an error when I use the nlm function
d<-matrix(c(1,1,0,0,0,0,0,0,2,1,0,0,1,1,0,1,2,2,1,0),nrow=10,ncol=2)
h<-matrix(runif(20,0,1),10)
integ<-matrix(c(0),nrow=10, ncol=2)
ll<-function(p){
for (k in 1:2){
for(s in 1:10){
integrand<-function(x)
2008 Jun 03
1
nlm behaviour and error
Hi R-Gurus,
I've been cutting along quite nicely with nlm, until
I threw in the following condition in the function that nlm is
minimising:
if (((term*bexp) < 0.0001)) {
#warning(term*bexp, "=term*bexp",psi,"=psi")
theta<-2000
}
Now when I run this function anywhere else, there is no problem, whether
or the if's condition is met.
When
1997 Jun 06
1
R-beta: nlm
I am trying to use the function "nlm" to find the mle. I want to use a
generic function for the likelihood which would require me to use both the
parameters and the data as arguments. But nlm requires the function to
have only the parameters as arguments for this function (see example below).
> testfun <- function(x,y) sum((x-y)^2) # x - parameters, y - data
>
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
2008 May 22
1
Computing Maximum Loglikelihood With "nlm" Problem
Hi,
I tried to compute maximum likelihood under gamma distribution,
using nlm function. The code is this:
__BEGIN__
vsamples<- c(103.9, 88.5, 242.9, 206.6, 175.7, 164.4)
mlogl <- function(alpha, x) {
if (length(alpha) > 1) stop("alpha must be scalar")
if (alpha <= 0) stop("alpha must be positive")
return(- sum(dgamma(x, shape = alpha, log = TRUE)))
2003 Sep 01
3
error message in nlm()
Hi all,
I have been trying the nlm function but received an error message
which reads:
Error in nlm(intensities ~ f, c(epsilon.spec.start,
epsilon.unspec.start, :
invalid function value in 'nlm' optimizer
The message is generated somewhere in the compiled part, apparently
within the function
static void fcn(int n, const double x[], double *f, function_info
*state)
where a jump
2009 Feb 19
2
Source code for nlm()
Hi,
Where can I find the source code for nlm()? I dowloaded the R2.8.1.tar.gz
file and looked at all the .c and .f files, but couldn't find either nlm.c
or nlm.f
There is an nlm.r file, but that is not useful.
Thanks for any help,
Ravi.
----------------------------------------------------------------------------
-------
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging