search for: nls2

Displaying 20 results from an estimated 39 matches for "nls2".

Did you mean: nls
2010 Sep 02
1
How using the weights argument in nls2?
Good morning gentlemen! How using a weighted model in nls2? Values with the nls are logical since values with nls2 are not. I believe that this discrepancy is due to I did not include the weights argument in nls2. Here's an example: MOISTURE <- c(28.41640, 28.47340, 29.05821, 28.52201, 30.92055, 31.07901, 31.35840, 31.69617, 32.07168, 31.8...
2010 Nov 24
1
The nls2 function automatically prints the object!
Good morning gentlemen! When I use the function nls2, and store it in an object, that object is automatically printed, without the summary or to draw the object. For example. model <- nls2 (...) Number of iterations to convergence: ... Achieved convergence tolerance: ... Nonlinear regression model model: ... ~ ... Date: NULL The B k .....
2010 May 11
1
nls() and nls2() behavior?
first, apologies for so many posts yesterday and today. I am wrestling with nls() and nls2(). I have tried to whittle it down to a simple example that still has my problem, yet can be cut-and-pasted into R. here it is: library(nls2) options(digits=12); y= c(0.4334,0.3200,0.5848,0.6214,0.3890,0.5233,0.4753,0.2104,0.3240,0.2827,0.3847,0.5571,0.5432,0.1326,0.3481) x= c(0.3521,0.4334,0....
2013 Jan 02
1
Need help with self-defined function to perform nonlinear regression and get prediction interval
Dear All, I was trying to call a self-defined function that performs nonlinear regression and gets the corresponding prediction upper limit using nls2 package. However, weird thing happened. When I called the function in the main program, an error message "fitted(nlsmodel): object 'nlsmodel' not found" came up. But when I directly ran the codes inside the function, no error came up and the codes worked well. I have never encount...
2004 Jul 22
1
package nls2 for windows
Dear Madam or sir, Does anyone know if there is a pre-compiled version of package nls2 for windows, please? Thank you. Souleymane
2010 Apr 30
2
Curve Fitting
I am having troubles in fitting functions of the form y~a*x^b+c to data, for example x<-c(0.1,0.36,0.63,0.90,1.166,1.43, 1.70, 1.96, 2.23) y<-c(8.09,9.0,9.62,10.11,10.53,10.9, 11.25, 11.56, 11.86) I tried for example with nls, which did only work with really good initial guessed values. Any suggestion, what I should use? Thanks a lot Thomas [[alternative HTML version deleted]]
2009 Jun 11
1
Error in 1:p : NA/NaN argument when running model comparisons
...a. The simplest model is one nonlinear curve, and in the more complex model I have a categorical variable (producing parameter estimates for four curves). Both models run fine, but when I try to produce an AIC value for the second model I get the error: > AIC(pow.nls1) [1] 114408.3 > AIC(pow.nls2) Error in 1:p : NA/NaN argument And similarly, when I try to compare the models with ANOVA, I get: anova(pow.nls1, pow.nls2) Error in if (df[i] > 0) { : missing value where TRUE/FALSE needed It seemed as if this could be a problem with the dataset, but I have checked thoroughly and there are...
2011 Oct 21
0
nls making R "not responding"
Here is the code I am running: library(nls2) modeltest<- function(A,mu,l,b,thour){ out<-vector(length=length(thour)) for (i in 1:length(thour)) { out[i]<-b+A/(1+exp(4*mu/A*(l-thour[i])+2)) } return(out) } A=1.3 mu=.22 l = 15 b = .07 thour = 1:25 Yvals<-modeltest(A,mu,l,b,thour)-.125+runif(25)/4 st2 <- expand.grid(A = seq(0....
2012 May 16
2
confidence intervals for nls or nls2 model
Hi all I have fitted a model usinf nls function to these data: > x [1] 1 0 0 4 3 5 12 10 12 100 100 100 > y [1] 1.281055090 1.563609934 0.001570796 2.291579783 0.841891853 [6] 6.553951324 14.243274230 14.519899320 15.066473610 21.728809880 [11] 18.553054450 23.722637370 The model fitted is: modellogis<-nls(y~SSlogis(x,a,b,c)) It runs OK. Then I calculate
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
2008 May 09
2
Regarding anova result
  Hi, I fitted tree growth data with Chapman-Richards growth function using nls. summary(fit.nls) Formula: Parameters: Estimate Std. Error t value Pr Signif. codes: 0 ''***'' 0.001 ''**'' 0.01 ''*'' 0.05 ''.'' 0.1 '' '' 1 Residual standard error: 1.879 on 713 degrees of freedom Algorithm
2005 Mar 08
4
Non-linear minimization
...lm(fn, p=c(4, 17, 5), hessian=TRUE,print.level=2) with estdata() a function which returns value to fit with dN (observed data vactor) My problem is that only optim() allows me to set parameters interval with "L-BFGS-B" method but this one doesn't work in my case. I have heard about nls2 package (www.inra.fr/bia) but it doesn't work on Windows. Do you know any solutions Thank's a lot for reading my post Best regards Sebastien INA P-G ecology dpt
2011 Mar 02
1
power regression: which package?
Dear R users and R friends, I have a little problem... I don't know anymore which package to use if I want to perform a power regression analysis. To be clear, I want to fit a regression model like this: fit <- ....(y ~ a * x ^ b + c) where a, b and c are coefficients of the model. The R Site does not have the answer I want... Thanks in advance and with kind regards, David
2011 Dec 11
1
nls start values
I'm using nls to fit periodic gene-expression data to sine waves. I need to set the upper and lower boundaries, because I do not want any negative phase and amplitude solutions. This means that I have to use the "port" algorithm. The problem is, that depending on what start value I choose for phase, the fit works for some cases, but not for others. In the example below, the fit works
2008 May 23
3
nls diagnostics?
Hi, All: What tools exist for diagnosing singular gradient problems with 'nls'? Consider the following toy example: DF1 <- data.frame(y=1:9, one=rep(1,9)) nlsToyProblem <- nls(y~(a+2*b)*one, DF1, start=list(a=1, b=1), control=nls.control(warnOnly=TRUE)) Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial
2012 Nov 03
6
Parámetros iniciales para ajustes no lineales
Hola a todos estoy aplicando la función polinómica de Hossfeld [1], y algunos otros modelos no lineales para tratar de ajustarlos a un grupo de datos forestales,   [1] Y= b*t*exp(c)/(t*exp(c)+a) Al colocar la función en R con parámetros estimados, me devuelve los siguiente: ## model1 <- nls(ho ~ (b*edad*exp(c)/(edad*exp(c)+a)), data=nigra,     start=list(a=0.005,b=0.08,c=-0.00006),
2009 Aug 25
3
Covariates in NLS (Multiple nonlinear regression)
...and get the resultant error messages: > weib.nls <- nls(Y ~ (a*(1-exp(-b*X^c)))|q, > + data=DATA, > + start=c(a=75,b=0.05,c=0.7)) > Error in nlsModel(formula, mf, start, wts) : > singular gradient matrix at initial parameter estimates > > summary(weib.nls) > > weib.nls2 <- nls(Y~ (a*(1-exp(-b*X^c)))+q, > + data=DATA, > + start=c(a=75,b=0.05,c=0.7)) > Error in numericDeriv(form[[3L]], names(ind), env) : > Missing value or an infinity produced when evaluating the model > Many thanks in advance! Lindsay
2009 Feb 10
3
summary of a list
Hello, I'm using the following for loop to find regression curves using a list of functions (formList), a list of starting values (startList), uppervalues (upperList) and lower values (lowerList). A sample of the list of function I use in the loop is the following: FormList <- list(PTG.P ~ fz1(Portata, a, b), PTG.P ~ fz2(Portata, a, b), PTG.P ~ fz3(Portata,a, b, d, e), PTG.P ~
2010 Jul 06
1
nls + quasi-poisson distribution
...to data (Discrete X axis, over-dispersed Poisson values on the Y axis). I found the functions gnlr in the gnlm package from Jim Lindsey: this can handle nonlinear regression equations for the parameters of Poisson and negative binomial distributions, among others. I also found the function nls2 in the software package accompanying the book "Statistical tools for nonlinear regression" by Huet et al: this can handle nonlinear regression with Poisson distributed Y-axis values. I was wondering if there was any other option: specifically, any option that handled nonlinear fitt...
2008 Apr 10
1
(no subject)
Subject: nls, step factor 0.000488281 reduced below 'minFactor' of 0.000976563 Hi there, I'm trying to conduct nls regression using roughly the below code: nls1 <- nls(y ~ a*(1-exp(-b*x^c)), start=list(a=a1,b=b1,c=c1)) I checked my start values by plotting the relationship etc. but I kept getting an error message saying maximum iterations exceeded. I have tried changing these