similar to: nls Error Message - Singular Gradient Matrix

Displaying 20 results from an estimated 7000 matches similar to: "nls Error Message - Singular Gradient Matrix"

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:
2018 May 05
0
Bug in profile.nls with algorithm = "plinear"
Dear sirs It seems like there is a bug in `profile.nls` with `algorithm = "plinear"` when a matrix is supplied on the right hand side. Here is the bug and a potential fix ##### # example where profile.nls does not work with `plinear` but does with # `default` require(graphics) set.seed(1) DNase1 <- subset(DNase, Run == 1) x <- rnorm(nrow(DNase1)) f1 <- nls(density ~ b1/(1 +
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
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
2008 Mar 28
1
Singular Gradient in nls
//Referring to the response posted many years ago, copied below, what is the specific criterium used for singularity of the gradient matrix? Is a Singular Value Decomposition used to determine the singular values? Is it the gradient matrix condition number or some other criterion for determining singularity? // //Glenn // / / /> What does the error 'singular gradient' mean
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
2008 Oct 02
1
nls with plinear and function on RHS
Dear R gurus, As part of finding initial values for a much more complicated fit I want to fit a function of the form y ~ a + bx + cx^d to fairly "noisy" data and have hit some problems. To demonstrate the specific R-related problem, here is an idealised data set, smaller and better fitting than reality: # idealised data set aDF <- data.frame( x= c(1.80, 9.27, 6.48, 2.61, 9.86,
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
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
2006 Jan 08
1
confint/nls
I have found some "issues" (bugs?) with nls confidence intervals ... some with the relatively new "port" algorithm, others more general (but possibly in the "well, don't do that" category). I have corresponded some with Prof. Ripley about them, but I thought I would just report how far I've gotten in case anyone else has thoughts. (I'm finding the code
2007 Oct 01
1
[nls] singular gradient
Hi, I am new to R. I don't have strong background of statistics. I am a student of Geotechnical Engineering. I tried to run a nonlinear regression for a three-variable function, that is N = f(CSR, ev) # N is a function of CSR and ev, and N = CSR/(A +B*CSR), wherer (A,B) are function of ev. N, CSR and ev are observed in the experiments. Following is my R script. rm(list=ls())
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
2003 Mar 26
1
nls
Hi, df <- read.table("data.txt", header=T); library(nls); fm <- nls(y ~ a*(x+d)^(-b), df, start=list(a=max(df->y,na.rm=T)/2,b=1,d=0)); I was using the following routine which was giving Singular Gradient, Error in numericDeriv(form[[3]], names(ind), env) : Missing value or an Infinity produced when evaluating the model errors. I also tried the
2012 Jan 30
1
Problem in Fitting model equation in "nls" function
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 "Day" is time-variable   ## my response variable   rl <-
2005 Jun 21
2
nls(): Levenberg-Marquardt, Gauss-Newton, plinear - PI curve fitting
Hello, i have a problem with the function nls(). This are my data in "k": V1 V2 [1,] 0 0.367 [2,] 85 0.296 [3,] 122 0.260 [4,] 192 0.244 [5,] 275 0.175 [6,] 421 0.140 [7,] 603 0.093 [8,] 831 0.068 [9,] 1140 0.043 With the nls()-function i want to fit following formula whereas a,b, and c are variables: y~1/(a*x^2+b*x+c) With the standardalgorithm
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
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 May 31
1
predict.nls - gives error but only on some nls objects
Dear list, I have encountered a problem with predict.nls (Windows XP, R.2.5.0), but I am not sure if it is a bug... On the nls man page, an example is: DNase1 <- subset(DNase, Run == 1) fm2DNase1 <- nls(density ~ 1/(1 + exp((xmid - log(conc))/scal)), data = DNase1, start = list(xmid = 0, scal = 1)) alg = "plinear", trace =