similar to: nls.regression syntax problem

Displaying 20 results from an estimated 3000 matches similar to: "nls.regression syntax problem"

2005 Apr 01
1
optim problem, nls regression
Hi, I try to fit a non linear regression by minimising the sum of the sum of squares. The model is number[2]-(x/number[1])^number[3] Number [2] and number [1] change as the data changes but for all the set of data number[3] must be identical. I have 3 set of data (x1,y1), (x2,y2), (x3,y3). x_a<-c(0,0.5,1,1.5,2,3,4,6) y_a<-c(5.4,5,4.84,4.3,4,2,1.56,1.3)
2005 Apr 08
0
TR: The results of your email commands
Hi, I try to minimize the sum of the sum of sce. The following program has been created but it only takes in consideration the last kinetic and not the first ones. I think that I have forget a subscrib but I don't know where. so if you can help me, it will be great.... I have try an other program where y and x are directly calculate in sce function but the time of
2008 Feb 26
0
NLS -- multiplicative errors and group comparison
Hello, I am attempting to fit a non-linear model (Von Bertalanffy growth model) to fish length-at-age data with the purpose of determining if any of the three parameters differ between male and female fish. I believe that I can successfully accomplish this goal assuming an additive error structure (illustrated in section 1 below). My trouble begins when I attempt this analysis using a model
2003 Aug 14
0
Bug in numericDeriv (was: [R] nls confidence intervals) (PR#3746)
Moved from r-help: On Thu, 14 Aug 2003 09:08:26 -0700, Spencer Graves <spencer.graves@pdf.com> wrote : >p.s. The following command in S-Plus 6.1 seems to work fine but >produces an error in R 1.7.1: > >nls(y~a, data=tstDf, start=list(a=1)) >Error in nlsModel(formula, mf, start) : singular gradient matrix at >initial parameter estimates This looks like a bug in
2010 Oct 13
2
Using NLS with a Kappa function
Hi Everyone, I am trying to use NLS to fit a dataset using a Kappa function, but I am having problems. Depending on the start values that I provide, I get either: Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an infinity produced when evaluating the model Or Error in nls(FldFatRate ~ funct3(MeanDepth_m, h, k, z, a), data = data1, : singular gradient I think these
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
2004 Mar 12
0
Basic questions on nls and bootstrap
Dear R community, I have currently some problems with non linear regression analysis in R. My data correspond to the degradation kinetic of a pollutant in two different soil A and B, x data are time in day and y data are pollutant concentration in soil. In a first time, I want to fit the data for the soil A by using the Ct = C0*exp(-k*Tpst) with Ct the concentration of pollutant at time t, C0
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
2003 Jun 27
2
nls question
I'm running into problems trying to use the nls function to fit the some data. I'm invoking nls using nls(s~k/(a+r)^b, start=list(k=1, a=13, b=0.59)) but I get errors indicating that the step has been reduced below the minimum step size or an inifinity is generated in numericDeriv. I've tried to use a variety of starting values for a, b, k but get similar errors. Is there
2005 Aug 18
1
How to put factor variables in an nls formula ?
Hello, I want to fit a Gompertz model for tree diameter growth that depends on a 4 levels edaphic factor (?Drain?) and I don?t manage to introduce the factor variable in the formula. Dinc is the annual diameter increment and D is the Diameter. >treestab > Dinc D Drain [1,] 0.03 26.10 2 [2,] 0.04 13.05 1 [3,] 0.00 24.83 1 [4,] 0.00 15.92 4
2004 Feb 19
1
controlling nls errors
Hello. I am using the nonlinear least squares function (nls). The function that I am trying to fit seems to be very sensitive to the starting values and, if these are not chosen properly, the nls function stops and gives an error message: Error in numericDeriv(form[[3]], names(ind), env) : Missing value or an Infinity produced when evaluating the model In addition: Warning
2006 Nov 08
1
nls
> y [1] 1 11 42 64 108 173 214 > t [1] 1 2 3 4 5 6 7 > nls(1/y ~ c*exp(-a*b*t)+1/b, start=list(a=0.001,b=250,c=5), trace=TRUE) 29.93322 : 0.001 250.000 5.000 Error in numericDeriv(form[[3]], names(ind), env) : Missing value or an infinity produced when evaluating the model # the start value for b is almost close to final estimates, # a is usually
2011 Oct 01
1
Problem with logarithmic nonlinear model using nls() from the `stats' package
Example: > f <- function(x) { 1 + 2 * log(1 + 3 * x) + rnorm(1, sd = 0.5) } > y <- f(x <- c(1 : 10)); y [1] 4.503841 5.623073 6.336423 6.861151 7.276430 7.620131 7.913338 8.169004 [9] 8.395662 8.599227 > nls(x ~ a + b * log(1 + c * x), start = list(a = 1, b = 2, c = 3), trace = TRUE) 37.22954 : 1 2 3 Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an
2011 Sep 20
1
NLS error
Hello there, I am using NLS for fitting a complex model to some data to estimate a couple of the missing parameters. The model is - y ~ (C+((log(1-r))*exp(-A*d)*(-1+r+exp(d*(A-B)))/(r*(-A*d+d*B+log(1-r))))) where A, B and C are unknown. In order to test the model, I generate data by setting values for all parameters and add some noise (C). A <- 20 B <- 500 r <- 0.6881 d <-
2012 Dec 16
1
nls for sum of exponentials
Hi there, I am trying to fit the following model with a sum of exponentials - y ~ Ae^(-md) + B e^(-nd) + c the model has 5 parameters A, b, m, n, c I am using nls to fit the data and I am using DEoptim package to pick the most optimal start values - fm4 <- function(x) x[1] + x[2]*exp(x[3] * -dist) + x[4]*exp(x[5] * -dist) fm5 <- function(x) sum((wcorr-fm4(x))^2) fm6 <- DEoptim(fm5,
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 Nov 08
1
Can someone Help in nls() package
Hello R-Community, we are running aprogram to fit Non-linear differential equations to Aphid population Data and to estimate the birth and death parameters, here is the code: dat<-data.frame(Time=c(0:60),Cur=c(5,6.2,59,39,38,44,20.4,19.4,34.2,35.4,38.2,48.2,55.4,113.2, 97,112,115,126,136.6,140.6,147.2,151.6,157.8,170,202,210.4,221.2,224.4,248.2,266,
2008 May 06
2
NLS plinear question
Hi All. I've run into a problem with the plinear algorithm in nls that is confusing me. Assume the following reaction time data over 15 trials for a single unit. Trials are coded from 0-14 so that the intercept represents reaction time in the first trial. trl RT 0 1132.0 1 630.5 2 1371.5 3 704.0 4 488.5 5 575.5 6 613.0 7 824.5 8 509.0 9
2003 May 08
1
nls, restrict parameter values
Hi, I posted a question (bellow) a few weeks ago and had a reply (thanks Christian) that partly solves the problem, but I still would like to be able to restrict some of the independent variables in a nls model to be always >0, (is there a way to do it)?? Thanks, Angel >From: "Christian Ritz" <ritz at dina.kvl.dk> >To: "Angel -" <angel_lul at
2010 Jan 13
1
Problem fitting a non-linear regression model with nls
Hi, I'm trying to make a regression of the form : formula <- y ~ Asym_inf + Asym_sup * ( (1 / (1 + (n1 * (exp( (tmid1-x) / scal1) )^(1/n1) ) ) ) - (1 / (1 + (n2 * (exp( (tmid2-x) / scal2) )^(1/n2) ) ) ) ) which is a sum of the generalized logistic model proposed by richards. with data such as these: x <- c(88,113,128,143,157,172,184,198,210,226,240,249,263,284,302,340) y <-