Displaying 20 results from an estimated 10000 matches similar to: "Newbie Question: Shifted Power Fit?"
2004 Aug 16
2
using nls to fit a four parameter logistic model
Shalini Raghavan
3M Pharmaceuticals Research
Building 270-03-A-10, 3M Center
St. Paul, MN 55144
E-mail: sraghavan at mmm.com
Tel: 651-736-2575
Fax: 651-733-5096
----- Forwarded by Shalini Raghavan/US-Corporate/3M/US on 08/16/2004 11:25
AM -----
Shalini
2013 Jul 09
3
fitting log function: errors using nls and nlxb
Hi-
I am trying to fit a log function to my data, with the ultimate goal of
finding the second derivative of the function. However, I am stalled on
the first step of fitting a curve.
When I use the following code:
FG2.model<-(nls((CO2~log(a*Time)+b), start=setNames(coef(lm(CO2 ~
log(Time), data=FG2)), c("a", "b")),data=FG2))
I get the following error:
Error in
2012 Jan 31
4
problem in fitting model 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 <-
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
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 <-
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
2009 Aug 25
3
Covariates in NLS (Multiple nonlinear regression)
Dear R-users,
I am trying to create a model using the NLS function, such that:
Y = f(X) + q + e
Where f is a nonlinear (Weibull: a*(1-exp(-b*X^c)) function of X and q is a covariate (continous variable) and e is an error term. I know that you can create multiple nonlinear regressions where x is polynomial for example, but is it possible to do this kind of thing when x is a function with unknown
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
2009 Sep 21
1
How to use nls when [selfStart] function returns NA or Inf??
Hi Everyone,
I posted this a couple of weeks ago with no responses. My interface (via
gmane) seemed a bit flakey at the time, so I'm venturing to repost with some
additional information.
I'm trying to write selfStart non-linear models for use with nls. In these
models some combinations of parameter values are illegal; the function value
is undefined.
That's OK when calling the
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 <-
2011 Jun 17
2
Non-linear Regression best-fit line
I am trying to fit a curve to a cumulative mortality curve (logistic) where y is the cumulative proportion of mortalities, and t is the time in hours (see below). Asym. at 0 and 1
> y
[1] 0.00000000 0.04853859 0.08303777 0.15201970 0.40995074 0.46444992 0.62862069 0.95885057 1.00000000
[10] 1.00000000 1.00000000
> t
[1] 0 13 20 24 37 42 48 61 72 86 90
I tried to find starting values for
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
2008 Jan 23
3
formula for nls
Hi!
How to write in model's formula of type:
nls(y~k/(x^n), data=data, start=list(k=1,n=1))
i.e the problem is on x^n, I(x^n) generate error
thanks
Jarek
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
2006 Aug 15
4
nls
Is there anyway to change any y[i] value (i=2,...6) to make following NLS workable?
x <- c(0,5,10,15,20,25,30)
y <- c(1.00000,0.82000,0.68000,0.64000,0.66667,0.68667,0.64000)
lm(1/y ~~ x)
nls(1/y ~~ a+b*x^c, start=list(a=1.16122,b=0.01565,c=1), trace=TRUE)
#0.0920573 : 1.16122 0.01565 1.00000
#Error in numericDeriv(form[[3]], names(ind), env) :
# Missing value or
2004 Jul 18
2
bootstrap and nls
Hi,
I am trying to bootstrap the difference between each parameters among two non linear regression (distributed loss model) as
following:
# 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
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),
2011 Aug 05
2
problemsn in using nls
Dear all,
I tried to use nls, but I got the following error
Error in numericDeriv(form[[3L]], names(ind), env) :
Missing value or an infinity produced when evaluating the model
Any suggestion?
Thanks,
Paola.
The code I wrote is
Data_pp2_mrna <- data.frame(
p1 = protein_1,
p6 = protein_6,
pp2_mrna
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
2012 Sep 04
3
Comparing Von Bertalanffy Growth Curves
I am trying to compare Vbert growth curves from several years of fish data. I am following the code provided by: http://www.ncfaculty.net/dogle/fishR/gnrlex/VonBertalanffy/VonBertalanffy.pdf. Specifically the section on VBGM Comparisons between groups.
?
This code is pretty cut and dry. I am able to run it perfectly with the "fake" data that is provided. But when I run it with my own