[mailto:[EMAIL PROTECTED] På vegne af Michael Lindner
> Sendt: 23. august 2007 08:07
> Til: r-help@stat.math.ethz.ch
> Emne: [R] nls() and numerical integration (e.g. integrate())
> workingtogether?
>
> Dear List-Members,
>
> since 3 weeks I have been heavily working on
Dear List-Members,
since 3 weeks I have been heavily working on reproducing the results of an
economic paper. The method there uses the numerical solution of an integral
within nonlinear least squares. Within the integrand there is also some
parameter to estimate. Is that in the end possible to im
Dear all,
In optim() all parameters of a function to be adjusted is stored in a single
vector, with lower/upper bounds can be specified by a vector of the same
length.
In nls(), is it true that if I want to specify lower/upper bounds, functions
must be re-written so that each parameter is contain
Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Daniela Salvini
Sent: Tuesday, February 13, 2007 4:09 PM
To: r-help@stat.math.ethz.ch
Subject: [R] nls: "missing value or an infinity" (Error in numericDeriv)
and"singular gradient matrix"E
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,
Xiaodong Jin <[EMAIL PROTECTED]> writes:
>> 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) :
>
> 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
> "SpG" == Spencer Graves <[EMAIL PROTECTED]>
> on Sat, 23 Sep 2006 00:52:30 -0700 writes:
SpG> I used "debug" to walk through your example line by line, I found
SpG> that the error message was misleading. By making
SpG> as.vector(semivariance) and as.vector(h) columns
I used "debug" to walk through your example line by line, I found
that the error message was misleading. By making
as.vector(semivariance) and as.vector(h) columns of a data.frame, I got
it to work. My revised code appears below.
Thanks for providing a self-contained and relati
Hello everyone !
I am trying to write a short program to estimate semivariogram
parameters. But I keep running into a problem when using the nls
function.
Could you please shed some light. I have put a sample of one of the
codes and ran a short example so you see what I mean.
-
Hello everyone !
I am trying to write a short program to estimate semivariogram
parameters. But I keep running into a problem when using the nls
function.
Could you please shed some light. I have put a sample of one of the
codes and ran a short example so you see what I mean.
-
RSiteSearch("grogger") produced nothing, which suggests that the
paper you cite is NOT cited in a help page in any package contributed to
CRAN. However, RSiteSearch("instrumental variables") just produced 31
hits for me, among which #11 was for "systemfit{systemfit}", which
mentions "ins
Yours truly menne-biomed.de> writes:
...
> Recently, a colleague fitted gastric emptying
> curves using GraphPad, with 100% success, and
> nls failed for one third of these. When we
> checked GraphPads output more closely, some of
> the coefficients looked like 2.1 with a confidence
> interval i
nls not converging for zero-noise cases
epamail.epa.gov> writes:
>
> No doubt Doug Bates would gladly accept patches ... .
>
The zero-noise case is irrlevant in practice, but quite often I have uttered
&/(!! (vituperation filter on) when nls did not converge with real data. The
dreaded "min
Joerg van den Hoff <[EMAIL PROTECTED]> wrote on 08/16/2006
08:22:03 AM:
> Earl F. Glynn wrote:
[deleted]
> > efg
> >
>
[deleted]
> (I think this is recognized by d. bates, but simply way down his 'to
do'
> list :-().
>
>
> joerg
No doubt Doug Bates would gladly accept patches ... .
>
>
Earl F. Glynn wrote:
> "Berton Gunter" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>>> Or, maybe there's something I don't understand about the
>>> algorithm being used.
>> Indeed! So before making such comments, why don't you try to learn about
>> it?
>> Doug Bates is a prett
Earl F. Glynn stowers-institute.org> writes:
>
> It's not clear to me why this problem cannot be "fixed" somehow. You
You might try optim instead of nls, which always (well, as far I used it)
converges. However, resulting coefficients may be totally off, and you should
use profiling to check t
"Berton Gunter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> Or, maybe there's something I don't understand about the
>> algorithm being used.
>
> Indeed! So before making such comments, why don't you try to learn about
> it?
> Doug Bates is a pretty smart guy, and I think yo
> Or, maybe there's something I don't understand about the
> algorithm being used.
Indeed! So before making such comments, why don't you try to learn about it?
Doug Bates is a pretty smart guy, and I think you do him a disservice when
you assume that he somehow overlooked something that he exp
"Dieter Menne" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Earl F. Glynn stowers-institute.org> writes:
> This toy problem is exactly what the warning is for:
>
> Warning
> Do not use nls on artificial "zero-residual" data.
>
> Add some noise and try again.
Thank you!
I had ad
Earl F. Glynn stowers-institute.org> writes:
>
> Here's my toy problem:
> > ?nls.control
> > ?nls
> > # Method 2
> > X <- 0:15
> > Y <- 9.452 * exp(-0.109*X) + 5.111 # Toy problem
> >
> > nls.out <- nls(Y ~ a*exp(b*X)+c,
> +start=list(a=6,b=-0.5,c=1),
> +control
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
On Tue, 15 Aug 2006, Peter Dalgaard wrote:
> Prof Brian Ripley <[EMAIL PROTECTED]> writes:
>
> > You problem is x^c for x = 0. If you intended only c > 1, try a starting
> > value meeting that condition (but it seems that the optimal c is about
> > 0.27 is you increase x slightly).
>
> Surely
Jin wrote:
Date sent: Tue, 15 Aug 2006 05:54:51 -0700 (PDT)
From: Xiaodong Jin <[EMAIL PROTECTED]>
To: r-help@stat.math.ethz.ch
Subject: [R] nls
> Is there anyway to change any y[i] value (i=2,...6) to make
> f
Prof Brian Ripley <[EMAIL PROTECTED]> writes:
> You problem is x^c for x = 0. If you intended only c > 1, try a starting
> value meeting that condition (but it seems that the optimal c is about
> 0.27 is you increase x slightly).
Surely you mean c > 0.
> nls(1/y ~ a+b*x^exp(c), start=list(a=
You problem is x^c for x = 0. If you intended only c > 1, try a starting
value meeting that condition (but it seems that the optimal c is about
0.27 is you increase x slightly).
Why have you used ~~ ? (Maybe because despite being asked not to, you
sent HTML mail?)
On Tue, 15 Aug 2006, Xiaodo
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.0,0.82000,0.68000,0.64000,0.7,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.1612
Hello All,
I'm looking to test a variable in a logit model (glm(...,
binomial(link="logit"))) for exogeneity (endogeneity). At this point I am
planning to try implementing Jeffery Grogger's "A Simple Test for Exogeneity in
Probit, Logit, and Poisson Regression Models", Economic Letters, 1990. To
"Larsen, Thomas" <[EMAIL PROTECTED]> writes:
> I collected eggs laid by Springtails everyday over 28 days after swich to
> isotopically enriched diet. The eggs were pooled at day 7, 14, and 28 (+ day
> 0 = initial value) and analyzed for isotopes. After the diet switch the
> isotopic values of
I collected eggs laid by Springtails everyday over 28 days after swich to
isotopically enriched diet. The eggs were pooled at day 7, 14, and 28 (+ day 0
= initial value) and analyzed for isotopes. After the diet switch the isotopic
values of the adults and eggs change towards those of the new di
Prof Brian Ripley <[EMAIL PROTECTED]>
To: Mihai Nica <[EMAIL PROTECTED]>
CC: r-help@stat.math.ethz.ch
Subject: Re: [R] nls model singular gradient matrix parametrization
Date: Fri, 2 Jun 2006 07:03:02 +0100 (BST)
Your model is over-parametrized: d1*exp(-gt) gives two parameters for one
Your model is over-parametrized: d1*exp(-gt) gives two parameters for one
constant. As a result, the least-square surface is flat in one direction,
and the gradient matrix is singular.
If this is the model you intended, you can simplify it by dropping d1.
It is also partially linear (d) so it
Greetings,
I am having a very hard time with a nonlinear regression. The last chance is
that maybe somebody can spot something wrong
The data and the model are
described below:
number of observations = 3030
y = [0,
,~16]
D1969 = [.16,
,~70,000]
mod=nls(log(D1969)~d-log(1+d1*exp(-gt+g1*y)), s
>From ?nls
data: an optional data frame in which to evaluate the variables in
'formula'.
>From the printout of 'Temp' it appears 'Temp' is a matrix. Assuming
'temp' is the same as 'Temp', it is not a data frame as required, and the
message is consistent with feeding eval() a nu
The data= argument cannot be a matrix. See ?nls
On 5/22/06, H. Paul Benton <[EMAIL PROTECTED]> wrote:
> So thanks for the help,
>
> I have a matrix (AB) which in the first column has my bin numbers so -4 - +4
> in 0.1 bin units. Then I have in the second column the frequency from some
> data. I h
So thanks for the help,
I have a matrix (AB) which in the first column has my bin numbers so -4 - +4
in 0.1 bin units. Then I have in the second column the frequency from some
data. I have plotted them and they look roughly Gaussian. So I want to fit
them/ find/optimize "mu", "sigma", and "A".
S
Lorenzo Isella wrote:
> Dear All,
> I may look ridiculous, but I am puzzled at the behavior of the nls with
> a fitting I am currently dealing with.
> My data are:
>
>x N
> 1 346.4102 145.428256
> 2 447.2136 169.530634
> 3 570.0877 144.081627
> 4 721.1103 106.363316
> 5 8
You have nearly as many parameters as data points which may
cause fundamental problem singularity problems but one thing to
try, just in case, is to transform it to unconstrained. For example,
let
A1 = 0.1 + A1x^2
and then substitute A1 with the right hand side so that it becomes a function
o
Dear All,
I may look ridiculous, but I am puzzled at the behavior of the nls with
a fitting I am currently dealing with.
My data are:
x N
1 346.4102 145.428256
2 447.2136 169.530634
3 570.0877 144.081627
4 721.1103 106.363316
5 894.4272 130.390552
6 1264.9111 36.727069
7
Hi Manuel,
an alternative to the approach pointed out by Prof. Ripley is to use
the package 'drc' which allows one or more parameters in a non-linear
regression model to depend on a factor.
You will need the latest version available at www.bioassay.dk (an older
version is available on CRAN).
Thanks, it was actually p.249, at least in my MASS3.
but that solved my doubt.
I've have another doubt, can this factor interact with
one of the parameters in the model?
My problem is basically a Michaelis Menten term, where
this factor determines a different Km. The rest of the
parameters in the
On Thu, 20 Apr 2006, Manuel Gutierrez wrote:
> Is it possible to include a factor in an nls formula?
Yes. What do you intend by it? If you mean what it would mean for a lm
formula, you need A[a] and starting values for A.
There's an example on p.219 of MASS4.
> I've searched the help pages w
Thanks Andrew. I am now trying but without much
success. I don't now how to give start values for the
factor?.
Could you give me an example solution with my toy
example?
a<-as.factor(c(rep(1,50),rep(0,50)))
independ<-1:100
respo<-rep(NA,100)
respo[a==1]<-(independ[a==1]^2.3)+2
respo[a==0]<-(indepe
Manuel,
I don't think that it works very easily. Instead, try gnls() in the
nlme package.
Cheers
Andrew
On Thu, Apr 20, 2006 at 11:18:02AM +0200, Manuel Gutierrez wrote:
> Is it possible to include a factor in an nls formula?
> I've searched the help pages without any luck so I
> guess it is n
Is it possible to include a factor in an nls formula?
I've searched the help pages without any luck so I
guess it is not feasible.
I've given it a few attempts without luck getting the
message:
+ not meaningful for factors in:
Ops.factor(independ^EE, a)
This is a toy example, my realworld case is
Hi, I am trying to run the following nonlinear regression model.
> nreg <- nls(y ~ exp(-b*x), data = mydf, start = list(b = 0), alg =
"default", trace = TRUE) OUTPUT: 24619327 : 0 24593178 :
0.0001166910 24555219 : 0.0005019005 24521810 : 0.001341571 245
Hi ,
I am using nls(formula)
where formula is y~ _expression
y is 1 character
~ is 1 character
now i have an _expression that is greater tha 502 characters. but R does not
recognize anything greater than 502 characters. (Note the _expression itself
is created using pas
Hi ,
I am using nls(formula)
where formula is y~ expression
y is 1 character
~ is 1 character
now i have an expression that is greater tha 502 characters. but R does not
recognize anything greater than 502 characters. (Note the expression itself is
created using paste
Hi ,
I am using nls(formula)
where formula is y~ expression
y is 1 character
~ is 1 character
now i have an expression that is greater tha 502 characters. but R does not
recognize anything greater than 502 characters. (Note the expression itself is
created using paste
Hi Harsh
As indicated in the answer to your first post, it is not so easy
to debug code without the code itself.
1) Have you checked the names of your variables so that you are
sure that they are correct. For example undesired white space
due to the automatic creation of variable names with
Hi..
is there a limit on the number of explanatory variables in nls ?
i have a dataframe with the columns names x1,x2..,x300
when i run nls it gives the error: " x181 not found"
thought it does run when i have x1,x2,...,x170 variables.
Thanks
Harsh
uessing.)
>
>
>
>
> Charles Annis, P.E.
>
> [EMAIL PROTECTED]
> phone: 561-352-9699
> eFax: 614-455-3265
> http://www.StatisticalEngineering.com
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of C
Charles Annis, P.E.
[EMAIL PROTECTED]
phone: 561-352-9699
eFax: 614-455-3265
http://www.StatisticalEngineering.com
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cal Stats
Sent: Saturday, March 11, 2006 3:43 PM
To: r-help@stat.math.ethz.ch
Subject: [R] nls s
--Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cal Stats
Sent: Saturday, March 11, 2006 3:43 PM
To: r-help@stat.math.ethz.ch
Subject: [R] nls start values
Hi,
I have a large number of parameters to estimate in nls say 100:
beta1--beta100
lets say
Hi,
I have a large number of parameters to estimate in nls say 100:
beta1--beta100
lets say i have 100 values in a vector
is there a way where i can create the start vector for nls using a loop
instead of individually filling the 100 values.
Thanks
Harsh
On Tue, 20 Dec 2005, Weijie Cai wrote:
> Hi list,
>
> I tried to use nls to do some nonlinear least square fitting on my data with
> 340 observations and 10 variables, but as I called nls() function, I got
> this error message:
> Error in qr.qty(QR, resid) : 'qr' and 'y' must have the same number
Hi list,
I tried to use nls to do some nonlinear least square fitting on my data with
340 observations and 10 variables, but as I called nls() function, I got
this error message:
Error in qr.qty(QR, resid) : 'qr' and 'y' must have the same number of rows
Then I traced back a little bit into nls(
I posted this a week ago on r-devel but to no avail and hope this not
considered cross-posting:
===cut===
hi everybody,
which each release I hope that the section
"weights: an optional numeric vector of (fixed) weights. When present,
Note that a simple logistic with a saturation level of 1 seems
to do quite well. Below we have removed the last point in order
to avoid the singularity:
x <- p.kum[-10]
y <- felt.prob.kum[-10]
plot(log(y/(1-y)) ~ x)
abline(lm(log(y/(1-y)) ~ x), col = "red")
On 10/31/05, Mark Hempelmann <[EMAIL P
math.ethz.ch
Subject
[R] nls() fit to Kahnemann/ Tversky
10/31/2005 04:14 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.
This works if you omit the deriv() step.
Use R's options(error=dump.frames) and debugger(). This gives
Browse[1]> rhs
[1] 0.433 0.4272571 0.3994105 0.3594037 0.3270730 0.3104752 0.3000927
[8] 0.2928445 0.2874249 0.2831787
attr(,"gradient")
VrVm alphalamd
Use a grid search to get the starting values in which case you
will likely be close enough that you won't run into problems
even without derivatives:
attach(fldgd)
grid <- expand.grid(Vr = seq(0,.3,.1), Vm = seq(.45, 1, .05),
alpha = seq(1,2,.25), lamda = seq(1,2,.25))
ss <- function(p) su
I am trying to it a particular nonlinear model common in Soil Science to
moisture release data from soil. I have written the function as shown
below according to the logist example in Ch8 of Pinheiro & Bates. I am
getting the following error (R version 2.1.1)
*Error in qr(attr(rhs, "gradient"
I have passed the identities and values of fixed parameters via the
"..." arguments in optim; I don't know about nls. Then internal to the
function that optim is to minimize, I combine the "x" argument with the
fixed parameters to obtain the full set of parameters. I've used that
e
Hi,
I am using nls() with the form: nls(~my.fcn(...)) because I have to
iteratively compute the expected y values. The function my.fcn() returns
y.obs-y.pred
However, I want to fix some of the parameters in my.fcn at various values
and compute the parameter estimates. In Splus there is such a
On 7/19/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Dear R-helpers,
>
> I am trying to estimate a model that I am proposing, which consists of putting
> an extra hidden layer in the Markov switching models. In the simplest case the
> S(t) - Markov states - and w(t) - the extra hidden variab
Dear R-helpers,
I am trying to estimate a model that I am proposing, which consists of putting
an extra hidden layer in the Markov switching models. In the simplest case the
S(t) - Markov states - and w(t) - the extra hidden variables - are independent,
and w(t) is constant. Formally the model loo
On 6/21/05, Manuel Morales <[EMAIL PROTECTED]> wrote:
> On Tue, 2005-06-21 at 06:57 -0400, Gabor Grothendieck wrote:
> > On 6/21/05, Christfried Kunath <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > i have a problem with the function nls().
> > >
> > > This are my data in "k":
> > >V1
On Tue, 2005-06-21 at 06:57 -0400, Gabor Grothendieck wrote:
> On 6/21/05, Christfried Kunath <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > i have a problem with the function nls().
> >
> > This are my data in "k":
> >V1V2
> > [1,]0 0.367
> > [2,] 85 0.296
> > [3,] 122 0.260
On 6/21/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> On 6/21/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> > On 6/21/05, Christfried Kunath <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > i have a problem with the function nls().
> > >
> > > This are my data in "k":
> > >V1
On 6/21/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> On 6/21/05, Christfried Kunath <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > i have a problem with the function nls().
> >
> > This are my data in "k":
> >V1V2
> > [1,]0 0.367
> > [2,] 85 0.296
> > [3,] 122 0.260
> >
On 6/21/05, Christfried Kunath <[EMAIL PROTECTED]> wrote:
> Hello,
>
> i have a problem with the function nls().
>
> This are my data in "k":
>V1V2
> [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
> [
G'day Chris,
> "CK" == Christfried Kunath <[EMAIL PROTECTED]> writes:
CK> With the nls()-function i want to fit following formula
CK> whereas a,b, and c are variables: y~1/(a*x^2+b*x+c)
CK> [...]
CK> The algorithm "plinear" give me following error:
The algorithm "plinear" is
Hello,
i have a problem with the function nls().
This are my data in "k":
V1V2
[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 for
joerg van den hoff wrote:
> hi everybody,
>
> is there a canonical way to get hold of the "trace=TRUE" output from
> nls, i.e. to copy it to a R variable (or at least to an external log file)?
>
> I have only found the possibility to "fix(nlsModel)" (and than the
> correct copy of that: namespace
hi everybody,
is there a canonical way to get hold of the "trace=TRUE" output from
nls, i.e. to copy it to a R variable (or at least to an external log file)?
I have only found the possibility to "fix(nlsModel)" (and than the
correct copy of that: namespace function ...) within the R-session
thank you, it worked.
Sylvia
--- Douglas Bates <[EMAIL PROTECTED]> wrote:
> Anaid Diaz wrote:
> > Hi,
> > I'm a new R user, with a lot of questions. At the
> > moment I'm stoped on an error traying to fit a
> model:
> >
> >
> >>x <- sandeel ## numeric data (2500-6)
> >>y <- Noss ## numeric
Anaid Diaz wrote:
Hi,
I'm a new R user, with a lot of questions. At the
moment I'm stoped on an error traying to fit a model:
x <- sandeel ## numeric data (2500-6)
y <- Noss ## numeric data (0-1.2)
A <- 0.8
B <- 0.6
C <- 1/4
nls( y ~ A-B*exp(-C*x))
Error in match.call(definition, call,
Hi,
I'm a new R user, with a lot of questions. At the
moment I'm stoped on an error traying to fit a model:
> x <- sandeel ## numeric data (2500-6)
> y <- Noss ## numeric data (0-1.2)
> A <- 0.8
> B <- 0.6
> C <- 1/4
> nls( y ~ A-B*exp(-C*x))
Error in match.call(definition, call, expand
(a41 - x, 0)^2 + b44*pmax(a42 - x, 0)^2
>
> You mention nlm, too. Here you would use a function rather than a
> formula, but the idea is the same.
>
> V.
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of andy
> Sent: Su
OTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of andy
Sent: Sunday, 17 April 2005 1:09 PM
To: r-help@stat.math.ethz.ch
Subject: [R] nls segmented model with unknown joint points
Hello,
I am interested in fitting a segmented model with unknown joint points
in nls and perhaps eventually in nlme. I can f
Hello,
I am interested in fitting a segmented model with unknown joint points
in nls and perhaps eventually in nlme. I can fit this model in sas (see
below, joint points to be estimated are a41 and a41), but am unsure how
to specify this in the nlm function. I would really appreciate any
suggest
Many people could help you, but the question is too general. In
brief, it means that the algorithm has found a place where the
(estimated?) matrix of first or second partial derivatives is of reduced
rank, and it refuses to do more. For such problems, I often use "optim".
If you ne
Hello,
I have a problem with nls() when I want to fit a model with more than two
parameters to be fitted which are written as start=list(a1=,a2=,a3=,...).
Everytime, it displays:'error... singular gradient'
it's a real pain!!!
Hope sb knows something about this
Thanks
GS
_
Hi, Doug:
How would you diagnose something like this? For example, might
the following (from ?nlsModel) help:
DNase1 <- DNase[ DNase$Run == 1, ]
mod <-
nlsModel(density ~ SSlogis( log(conc), Asym, xmid, scal ),
DNase1, start=list( Asym = 3, xmid = 0, scal = 1 )
[EMAIL PROTECTED] wrote:
Dear list,
I do have a problem with nls. I use the following data:
test
time conc dose
0.50 5.401
0.75 11.101
1.00 8.401
1.25 13.801
1.50 15.501
1.75 18.001
2.00 17.001
2.50 13.901
3.00 11.201
3.50 9.
Dear list,
I do have a problem with nls. I use the following data:
>test
time conc dose
0.50 5.401
0.75 11.101
1.00 8.401
1.25 13.801
1.50 15.501
1.75 18.001
2.00 17.001
2.50 13.901
3.00 11.201
3.50 9.901
4.00 4.70
Mike
nlsList from nlme library can fit nonlinear models for dataset grouped by
some specification, e.g. by specie in your case
Regards
Christian
>-- Mensaje Original --
>From: "Mike Saunders" <[EMAIL PROTECTED]>
>To: "R Help" <[EMAIL PROTECTED]>
>Date:
Just a quick question. Is there a way to easily specify factor levels in a
function definition within nls? For example, I am trying to fit a 3 parameter,
nonlinear Weibull function to tree height and I would like to have results by
species (or down the road a bit, by plot). I am hoping there
Yang, Richard wrote:
Dear R-helpers;
Using nls() to fit a function,Rdum, defined below I stumbled on an
error: "Error in eval(expr, envir, enclos): Object "s0" not found."
The function Rdum is defined as
Rdum <- deriv(~ h1 * (s0 + sl0*sl + sm0*sm + sp01*sp1 + sp02*sp2 +
sp03*sp3+sp
Dear R-helpers;
Using nls() to fit a function,Rdum, defined below I stumbled on an
error: "Error in eval(expr, envir, enclos): Object "s0" not found."
The function Rdum is defined as
Rdum <- deriv(~ h1 * (s0 + sl0*sl + sm0*sm + sp01*sp1 + sp02*sp2 +
sp03*sp3+sp04*sp4) *
Douglas Bates <[EMAIL PROTECTED]> writes:
> Often when nls doesn't converge there is a good reason for it.
>
> I'm on a very slow internet connection these days and will not be able
> to look at the data myself but I ask you to bear in mind that, when
> dealing with nonlinear models, there are mo
Often when nls doesn't converge there is a good reason for it.
I'm on a very slow internet connection these days and will not be able
to look at the data myself but I ask you to bear in mind that, when
dealing with nonlinear models, there are model/data set combinations for
which there are no pa
Have a look at optim (which supports a number of different algorithms via
the method= arg) and segmented in package segmented which does segmented
regression.
For example,
ss <- function(par) {
b <- par[1]; c1 <- par[2]; c2 <- par[3]; d <- par[4]
x <- df1$x; y <- df1$y
su
Hallo!
I have a problem with fitting data with nls. The first
example with y1 (data frame df1) shows an error, the
second works fine.
Is there a possibility to get a fit (e.g. JMP can fit
also data I can not manage to fit with R). Sometimes I
also got an error singularity with starting
parameter
On Thu, 10 Jun 2004, Prof Brian Ripley wrote:
> On Thu, 10 Jun 2004, Prof Brian Ripley wrote:
>
> > Around R 1.2.x the notion was introduced that variables should be looked
> > for in the environment of a formula. Functions using model.frame got
> > converted to do that, but nls did not. I gu
On Thu, 10 Jun 2004, joerg van den hoff wrote:
> Prof Brian Ripley wrote:
>
> >On Thu, 10 Jun 2004, Prof Brian Ripley wrote:
> >
> >
> >
> >>Around R 1.2.x the notion was introduced that variables should be looked
> >>for in the environment of a formula. Functions using model.frame got
> >>c
Prof Brian Ripley wrote:
On Thu, 10 Jun 2004, Prof Brian Ripley wrote:
Around R 1.2.x the notion was introduced that variables should be looked
for in the environment of a formula. Functions using model.frame got
converted to do that, but nls did not. I guess that the best way forward
is to
On Thu, 10 Jun 2004, Prof Brian Ripley wrote:
> Around R 1.2.x the notion was introduced that variables should be looked
> for in the environment of a formula. Functions using model.frame got
> converted to do that, but nls did not. I guess that the best way forward
> is to ensure that nls (a
1 - 100 of 150 matches
Mail list logo