Re: [R] problem in fitting model in NLS function

2012-11-15 Thread U30A J C Nash
: 21 Date: Wed, 14 Nov 2012 03:04:56 -0800 (PST) From: muzammil786 To: r-help@r-project.org Subject: Re: [R] problem in fitting model in NLS function Message-ID: <1352891096449-4649473.p...@n4.nabble.com> Content-Type: text/plain; charset=us-ascii Dear David, I am having a similar proble

Re: [R] problem in fitting model in NLS function

2012-11-14 Thread muzammil786
Dear David, I am having a similar problem on this data (given below). I have tried several starting values for a and b, but it is consistently giving me: *fm <- nls(y~f(x,a,b), data.frame(x,y), start=c(a=1,b=1)) Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an infinity

Re: [R] problem in fitting model in NLS function

2012-02-01 Thread Rolf Turner
I am no expert on nls() but since I haven't seen any replies to your post, I'll chip in: (1) I am mystified as to why nls() is giving that error about a "singular" (???) gradient. (2) That being said, I think your parameterisation of the objective function is a bit flaky. I would use

Re: [R] problem in fitting model in NLS function

2012-01-31 Thread David Stevens
Ram These errors often show up with starting values that are poor and wander into 'illegal' territory (divide by zero, exp(large number), log(negative or zero), etc. Consider putting constraints on the parameters (?nls will guide you) and working harder to get starting values by plotting the d

[R] problem in fitting model in NLS function

2012-01-31 Thread ram basnet
Dear R users, I am struggling to fit expo-linear equation to my data using "nls" function. I am always getting error message as i highlighted below in yellow color:  Theexpo-linear equation which i am interested to fit my data:   response_variable =  (c/r)*log(1+exp(r*(Day-tt))), where "