Re: [R] nlm() giving initials as estimates of parameters

2016-04-14 Thread Jeff Newmiller
Unlikely that someone will be interested in guessing. You are much more likely to get a constructive response if you provide the minimal reproducible example requested in the footer. Of course, it is possible that you just might find the answer if you carefully read the help page for nlm, since

[R] nlm() giving initials as estimates of parameters

2016-04-14 Thread amina
Hi R community I have written a loglikelihood function which I am minimizing using nlm(). nlm() is giving me no results...I mean, I am getting initial values as estimates. No iteration. I have tried many initials value close to true values and far away from tru values. But every time I am gett

[R] nlm is

2010-06-15 Thread Hiba Baroud
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

Re: [R] NLM OUTPUT

2009-11-06 Thread Peter Ehlers
224-405-1425 Fax 224-405-4971 robertag...@discover.com Steve Lianoglou 11/05/2009 04:56 PM To "" cc r-help@r-project.org Subject Re: [R] NLM OUTPUT Hi Bob

Re: [R] NLM OUTPUT

2009-11-05 Thread robertagnew
.com Steve Lianoglou 11/05/2009 04:56 PM To "" cc r-help@r-project.org Subject Re: [R] NLM OUTPUT Hi Bob, On Nov 5, 2009, at 3:04 PM, wrote: > I am missing something fundamental. I ran the fu

Re: [R] NLM OUTPUT

2009-11-05 Thread robertagnew
ax 224-405-4971 robertag...@discover.com Steve Lianoglou 11/05/2009 04:56 PM To "" cc r-help@r-project.org Subject Re: [R] NLM OUTPUT Hi Bob, On Nov 5, 2

Re: [R] NLM OUTPUT

2009-11-05 Thread Steve Lianoglou
documentation about converting such a list element to the vector it displays. Are you just asking how to pull out the appropriate parts of the returned value from the nlm function call? Taking code from the Example section of ?nlm, run this: R> f <- function(x, a) sum((x-a)^2) R> r &

[R] NLM OUTPUT

2009-11-05 Thread robertagnew
I am missing something fundamental. I ran the function nlm, but I don't understand how to extract the optimal solution as a numeric vector. The function produces it as one element of a list. I don't see anything in the R documentation about converting such a list element to the vector it dis

Re: [R] NLM

2009-09-27 Thread Uwe Ligges
Andrew Wang wrote: I am trying to understand NLM package, so I generated this data set consisting y and x using y= a + b*x +c*x^2 + N(0,10), with a=3.5,b=4.5,c=5.5 Given y and x, I am trying to use NLM to have estimates of parameters a, b and c that minimize the least square error my co

[R] NLM

2009-09-25 Thread Andrew Wang
I am trying to understand NLM package, so I generated this data set consisting y and x using y= a + b*x +c*x^2 + N(0,10), with a=3.5,b=4.5,c=5.5 Given y and x, I am trying to use NLM to have estimates of parameters a, b and c that minimize the least square error my code looks like f<- fu

[R] nlm return wrong function value - garch fitting

2008-10-14 Thread Scotty Nelson
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 p

Re: [R] nlm behaviour and error

2008-06-02 Thread Prof Brian Ripley
It says the value is *missing* (NA), not that the length is wrong. My quess is that term*bexp is NaN, but you have given us no context to go on. On Tue, 3 Jun 2008, Redding, Matthew wrote: Hi R-Gurus, I've been cutting along quite nicely with nlm, until I threw in the following condition in

[R] nlm behaviour and error

2008-06-02 Thread Redding, Matthew
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

Re: [R] nlm and "missing argument

2008-05-29 Thread Charilaos Skiadas
On May 29, 2008, at 11:54 PM, Redding, Matthew wrote: Dear R Gurus, I am having a little difficulty with nlm. I've searched the archives and found nothing that tells me why this is occuring -- though there are some slightly similar issues. A simple example: lev2<-function(aaa,bbb,ccc,ddd,e

[R] nlm and "missing argument

2008-05-29 Thread Redding, Matthew
Dear R Gurus, I am having a little difficulty with nlm. I've searched the archives and found nothing that tells me why this is occuring -- though there are some slightly similar issues. A simple example: lev2<-function(aaa,bbb,ccc,ddd,eee){ res<-aaa+bbb+ccc+ddd+eee res } nlm(l