similar to: Singular Gradient in nls

Displaying 20 results from an estimated 11000 matches similar to: "Singular Gradient in nls"

2012 Jul 11
2
nls problem: singular gradient
Why fails nls with "singular gradient" here? I post a minimal example on the bottom and would be very happy if someone could help me. Kind regards, ########### # define some constants smallc <- 0.0001 t <- seq(0,1,0.001) t0 <- 0.5 tau1 <- 0.02 # generate yy(t) yy <- 1/2 * ( 1- tanh((t - t0)/smallc) * exp(-t / tau1) ) + rnorm(length(t))*0.01 # show the curve
2013 Jun 19
1
nls singular gradient ..as always..
Hi all. Sorry for posting again such a topic but I went through previous posts but couldn't find a solution. I use the following code to fit an exponential model to my data. I have 4 different datasets. For 3 datasets nls seems to work fine and I have no error messages. But for 1 dataset I am getting the "world known" singular gradient error. xfit.dNEE <-
2010 Apr 28
1
NLS "Singular Gradient" Error
Hello, I am trying to model a type II functional response of number of prey eaten (Ne) against number supplied (No) with a non-linear least squares regression (nls). I am using a modification of Holling's (1959) disc equation to account for non-replacement of prey; Ne=No{1-exp[a(bNe-T)]} where a is the attack rate, b is the handling time, and T is the experimental period. My script is as
2007 Sep 05
3
'singular gradient matrix’ when using nls() and how to make the program skip nls( ) and run on
Dear friends. I use nls() and encounter the following puzzling problem: I have a function f(a,b,c,x), I have a data vector of x and a vectory y of realized value of f. Case1 I tried to estimate c with (a=0.3, b=0.5) fixed: nls(y~f(a,b,c,x), control=list(maxiter = 100000, minFactor=0.5 ^2048),start=list(c=0.5)). The error message is: "number of iterations exceeded maximum of
2005 Apr 23
1
start values for nls() that don't yield singular gradients?
I'm trying to fit a Gompertz sigmoid as follows: x <- c(15, 16, 17, 18, 19) # arbitrary example data here; y <- c(0.1, 1.8, 2.2, 2.6, 2.9) # actual data is similar gm <- nls(y ~ a+b*exp(-exp(-c*(x-d))), start=c(a=?, b=?, c=?, d=?)) I have been unable to properly set the starting value '?'s. All of my guesses yield either a "singular gradient" error if they
2011 Jun 30
1
Error "singular gradient matrix at initial parameter estimates" in nls
Greetings, I am struggling a bit with a non-linear regression. The problem is described below with the known values r and D inidcated. I tried to alter the start values but get always following error message: Error in nlsModel(formula, mf, start, wts): singular gradient matrix at initial parameter estimates Calls: nls -> switch -> nlsModel I might be missing something with regard to the
2007 Feb 13
1
nls: "missing value or an infinity" (Error in numericDeriv) and "singular gradient matrix"Error in nlsModel
Hi, I am a non-expert user of R. I am essaying the fit of two different functions to my data, but I receive two different error messages. I suppose I have two different problems here... But, of which nature? In the first instance I did try with some different starting values for the parameters, but without success. If anyone could suggest a sensible way to proceed to solve these I would be
2011 Oct 11
1
singular gradient error in nls
I am trying to fit a nonlinear regression to infiltration data in order to determine saturated hydraulic conductivity and matric pressure. The original equation can be found in Bagarello et al. 2004 SSSAJ (green-ampt equation for falling head including gravity). I am also VERY new to R and to nonlinear regressions. I have searched the posts, but am still unable to determine why my data come up
2009 Aug 25
1
Help with nls and error messages singular gradient
Hi All, I'm trying to run nls on the data from the study by Marske (Biochemical Oxygen Demand Interpretation Using Sum of Squares Surface. M.S. thesis, University of Wisconsin, Madison, 1967) and was reported in Bates and Watts (1988). Data is as follows, (stored as mydata) time bod 1 1 0.47 2 2 0.74 3 3 1.17 4 4 1.42 5 5 1.60 6 7 1.84 7 9 2.19 8 11 2.17 I then
2010 Dec 13
2
Complicated nls formula giving singular gradient message
I'm attempting to calculate a regression in R that I normally use Prism for, because the formula isn't pretty by any means. Prism presents the formula (which is in the Prism equation library as Heterologous competition with depletion, if anyone is curious) in these segments: KdCPM = KdnM*SpAct*Vol*1000 R=NS+1 S=(1+10^(X-LogKi))*KdCPM+Hot a=-1*R b=R*S+NS*Hot+BMax c = -1*Hot*(S*MS+BMax) Y
2013 Oct 03
2
SSweibull() : problems with step factor and singular gradient
SSweibull() :  problems with step factor and singular gradient Hello I am working with growth data of ~4000 tree seedlings and trying to fit non-linear Weibull growth curves through the data of each plant. Since they differ a lot in their shape, initial parameters cannot be set for all plants. That’s why I use the self-starting function SSweibull(). However, I often got two error messages:
2011 Jun 09
0
nls Error Message - Singular Gradient Matrix
I've been trying to run some analysis using the nls function in R but keep coming up with an error message which I don't understand how to fix. The message follows here: Error in nls(formula = f.p, data = n.data, start = list(S = 1, a = -0.1, : singular gradient In addition: Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) : no non-missing
2011 Feb 15
2
"Error : singular gradient matrix at initial parameters estimates"
Dear all, I am a fresh user of R and I already face to problems that I don't understand. In the use of the function nls(), I systematically have an error message : "Singular gradient matrix at initial parameters estimates". I tried to use nls() on a set of data that I subseted from a bigger matrix data. I wish to fit a gaussian on these points (spectrum) and draw this fit on the
2010 Mar 30
6
Error "singular gradient matrix at initial parameter estimates" in nls
I am using nls to fit a non linear function to some data. The non linear function is: y= 1- exp(-(k0+k1*p1+ .... + kn*pn)) I have chosen algorithm "port", with lower boundary is 0 for all of the ki parameters, and I have tried many start values for the parameters ki (including generating them at random). If I fit the non linear function to the same data using an external
2007 Feb 07
1
Singular Gradient
I tried to fit data with the following function: fit<-nls(y~ Is*(1-exp(-l*x))+Iph,start=list(Is=-2e-5,l=2.3,Iph=-0.3 ),control=list(maxiter=500,minFactor=1/10000,tol=10e-05),trace=TRUE) But I get only a singular Gradient warning... the data can by found attached(there are two sampels of data col 1/2 and 3/4). I tried to fix it by chanching the start parameters but that didn't solve the
2007 Oct 01
2
non-linear model parameterization
Dear all, I would like to fit a non-linear model of the form: y=g*x/(a+b*x) with nls(). However this model is somehow overparameterized and I get the error message about singular gradient matrix at initial parameter estimates. What I am interested in is to make inference about parameters b and g, so this has to be taken into account in the model formulation. What options do I have? Also, how is
2004 Jun 29
1
nls fitting problems (singularity)
Hallo! I have a problem with fitting data with nls. The first example with y1 (data frame df1) shows an error, the second works fine. Is there a possibility to get a fit (e.g. JMP can fit also data I can not manage to fit with R). Sometimes I also got an error singularity with starting parameters. # x-values x<-c(-1,5,8,11,13,15,16,17,18,19,21,22) # y1-values (first data set)
2008 Feb 15
3
Error 'singular gradient' in nonlinear model fitting
w.age.female.2004 <- nls(WEIGHT ~ (alpha*TOTAL^beta)/454, start=list(alpha=1, beta=3), data=spottedseatrout2004.female.data) I am trying to fit above model to length-weight data of a fish species (spotted seatrout) by year (1999-2006). The convergence occurred for all the years except 2002 and 2004. In these two year, R shows the error called
2011 Apr 11
1
Non linear Regression: "singular gradient matrix at initial parameter estimates"
Hi, I am using nls to fit a non linear function to some data but R keeps giving me "singular gradient matrix at initial parameter estimates" errors. For testing purposes I am doing this: ### R code ### x <- 0:140 y <- 200 / (1 + exp(17 - x)/2) * exp(-0.02*x) # creating 'perfect' samples with fitting model yeps <- y + rnorm(length(y), sd = 2) # adding noise # results
2006 Sep 29
1
linear gradient in nls
Hello, I hope this doesn't turn into a statistics question but here I go. I am using the nls function with a Gaussian distribution, see coding below. When I run the nls I get an error back saying that I have a linear gradient. I then, of course am unable to do anything else. The data that I am using are intensity values from some mass spectrometry data. Is there something I can