search for: nls

Displaying 20 results from an estimated 2091 matches for "nls".

Did you mean: cls
2011 Feb 08
4
Interactions in a nls model
I am interested in testing two similar nls models to determine if the lines are statistically different when fitted with two different data sets; one corn, another soybean. I know I can do this in linear models by testing for interactions. See Introductory Statistics with R by Dallgaard p212-218 for an example. I have two different data...
2012 Apr 02
2
nls() error
Hello, I am running a simple nls model (which a friend ran OK) but I get the following error: Error in nls(y ~ R * (1 - (x/K)^2), data = nls.dat, start = list(R = 0.3, : object 'R_nls_iter' not found Does anyone know what the 'R_nls_iter' error is? The data are: x=1:8 ; y=c(14,19,25,34,43,56,69,76) # star...
2007 Feb 21
1
Confindence interval for Levenberg-Marquardt fit
Dear all, I would like to use the Levenberg-Marquardt algorithm for non-linear least-squares regression using function nls.lm. Can anybody help me to find a a way to compute confidence intervals on the fitted parameters as it is possible for nls (using confint.nls, which does not work for nls.lm)? Thank you for your help Michael
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
Hi, I am running simulations that does multiple comparisons to control. For each simulation, I need to model 7 nls functions. I loop over 7 to do the nls using try if try fails, I break out of that loop, and go to next simulation. I get warnings on nls failures, but the simulation continues to run, except when the internal call (internal to nls) of the chol2inv fails. =======================================...
2004 Jul 18
2
bootstrap and nls
...lowing: # data.frame > Raies[1:10,] Tps SolA Solb 1 0 32.97 35.92 2 0 32.01 31.35 3 1 21.73 22.03 4 1 23.73 18.53 5 2 19.68 18.28 6 2 18.56 16.79 7 3 18.79 15.61 8 3 17.60 13.43 9 4 14.83 12.76 10 4 17.33 14.91 etc... # non linear model (work well) RaiesLossA.nls<-nls(SolA~a/(1+b*Tps)^c,start=c(a=32,b=0.5,c=0.6)) RaiesLossB.nls<-nls(Solb~a/(1+b*Tps)^c,start=c(a=33,b=1.5,c=0.5)) # bootstrap library(boot) dif.param<-function(data,i){ RaiesLossA.nls<-nls(SolA[i]~a/(1+b*Tps[i])^c,start=c(a=31,b=0.5,c=0.6)) RaiesLossB.nls<-nls(Solb[i]~a/(1+b*Tp...
2007 Apr 15
1
nls.control( ) has no influence on nls( ) !
Dear Friends. I tried to use nls.control() to change the 'minFactor' in nls( ), but it does not seem to work. I used nls( ) function and encountered error message "step factor 0.000488281 reduced below 'minFactor' of 0.000976563". I then tried the following: 1) Put "nls.control(minFactor = 1/(4096*...
2010 Mar 20
2
different forms of nls recommendations
Hello, Using this data: http://n4.nabble.com/file/n1676330/US_Final_Values.txt US_Final_Values.txt and the following code i got the image at the end of this message: US.final.values<-read.table("c:/tmp/US_Final_Values.txt",header=T,sep=" ") US.nls.1<-nls(US.final.values$ECe~a*US.final.values$WTD^b+c,data=US.final.values,start=list(a=2.75,b=-0.95,c=0.731),trace=TRUE) f.US1<-function(x){coef(US.nls.1)["a"]*x^coef(US.nls.1)["b"]+coef(US.nls.1)["c"]} xvals.US1<-seq(min(US.final.values$WTD),max(US.final.valu...
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))....
2006 Feb 07
1
sampling and nls formula
Hello, I am trying to bootstrap a function that extracts the log-likelihood value and the nls coefficients from an nls object. I want to sample my dataset (pdd) with replacement and for each sampled dataset, I want to run nls and output the nls coefficients and the log-likelihood value. Code: x<-c(1,2,3,4,5,6,7,8,9,10) y<-c(10,11,12,15,19,23,26,28,28,30) pdd<-data.frame(x,y) i&l...
2006 Aug 15
2
nls convergence problem
I'm having problems getting nls to agree that convergence has occurred in a toy problem. nls.out never gets defined when there is an error in nls. Reaching the maximum number of iterations is alway an error, so nls.out never gets defined when the maximum number of iterations is reched. >From ?nls.control: tol: A positi...
2006 Sep 23
1
Fitdistr() versus nls()
...tic curve, and I have an important question to ask; in particular I have some data, from which I calculate manually the CDF, and then I import them into R and try to fit: I have the x values (my original samples) and the y values (P(X<x)). To attempt the fit I've both fitdistr() and nls(), in the way you can read in the piece of code at the end of the email. Because the fit with all data doesn't work very well, I decided to take a subset of samples randomly chosen (for some random x, the correspondant y is chosen). The first big problem is that fitdistr and nls, in th...
2002 May 09
5
nls (PR#1533)
Full_Name: Sophie Smout Version: 1.5.0 OS: windows 2000, pc Submission from: (NULL) (138.251.190.17) I'm finding that nls iterates to the end of its iteration setting and does not jump out to report convergence even when it has clearly converged. It is also mis-reporting the number of iterations completed. These may not be unconnected... This is an example: [note - details of my computer, version etc are at the end...
2002 Feb 09
2
Language not supported
Hello I use in /etc/X11/XF86Config XkBLayout "sr" and have defined in KDE Srbija, srpski, ISO 8859-2 And allways got the messages: fixme:string:GetLocaleInfoA 'IDEFAULTMACCODEPAGE' is not defined for your language (081A). Please define it in dlls/kernel/nls/YourLanguage.nls and submit patch for inclusion into the next Wine release. fixme:keyboard:X11DRV_KEYBOARD_DetectLayout Your keyboard layout was not found! Using closest match instead (Croatian keyboard layout) for scancode mapping. Please define your layout in windows/x11drv/keyboard.c and submi...
2005 Apr 06
1
nls.control
Hello everyone, I'm trying to test the accurracy of R on the Eckerle4 dataset from NIST and I don't understand how the control option of the nls function works. I tought nls(...) was equivalent to nls(...control=nls.control()) i.e nls.control() was the default value of control, but here is the error I get : > n2=nls(V1~(b1/b2) * exp(-0.5*((V2-b3)/b2)^2),data=ecker,start=list(b1=1.5,b2=5,b3=450,control=nls.control())) Error in nlsModel...
2005 Oct 31
2
nls() fit to Kahnemann/ Tversky function
Dear WizaRds, I would like to fit a curve to ten points with nls() for one unknown parameter gamma in the Kahnemann/ Tversky function, but somehow it won't work and I am unable to locate my mistake. p.kum <- seq(0.1,1, by=0.1) felt.prob.kum <- c(0.16, 0.23, 0.36, 0.49, 0.61, 0.71, 0.85, 0.89, 0.95, 1) ## how to find a function that fits these point...
2002 Apr 23
1
Use of nls command
Hello. I am trying to do a non-linear fit using the 'nls' command. The data that I'm using is as follows pH k 1 3.79 34.21 2 4.14 25.85 3 4.38 20.45 4 4.57 15.61 5 4.74 12.42 6 4.92 9.64 7 5.11 7.30 8 5.35 5.15 9 5.67 3.24 with a transformation of pH to H <- 10^-pH When using the nls command for a set of parameters - a, b and c...
2004 Jul 01
2
Individual log likelihoods of nlsList objects.
Hello all. I was wondering if the logLike.nls() and logLike.nlme() functions are still being used. Neither function seems to be available in the most recent release of R (1.9.1). The following is contained in the help file for logLik(): "classes which already have methods for this function include: 'glm', 'lm', 'nls...
2008 Jun 26
3
bug in nls?
Dear all Nobody responded to my previous post so far so I try with more offending subject. I just encountered a strange problem with nls formula. I tried to use nls in cycle but I was not successful. I traced the problem to some parse command. Here is an example DF<-data.frame(x=1:10, y=3*(1:10)^.5+rnorm(10)) coef(lm(log(DF[,2])~log(DF[,1]))) (Intercept) log(DF[, 1]) 0.7437320 0.6831726 # this works coef(nls(y~a*x^...
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))...
2003 Nov 24
2
How to get the parameters of nls(...) for later use
Hi all, I need to use the parameter estimates of nls() for further analysis. I know how to do in S+, e.g. nls(...)$parameters. In R, the attributes(nls(...)) does not have parameters, how would one get the parameter values out of nls()? Thanks in advance. Nancy