On Fri, 22 Mar 2019 12:29:14 +
akshay kulkarni wrote:
> How do I get the gradient, Hessian, and the jacobian of the
> objective function created by call to the nls?
nls() return value is a list containing an entry named `m`, which is an
object of type "nlsModel". It doesn't seem to be docume
> Ivan Krylov
> on Thu, 21 Mar 2019 18:36:20 +0300 writes:
> One of the assumptions made by least squares method is that the
> residuals are independent and normally distributed with same parameters
> (or, in case of weighted regression, the standard deviation of the
>
erely,
AKSHAY M KULKARNI
From: Ivan Krylov
Sent: Thursday, March 21, 2019 9:06 PM
To: r-help@r-project.org
Cc: akshay kulkarni
Subject: Re: [R] problem with nls
One of the assumptions made by least squares method is that the
residuals are independent and normal
One of the assumptions made by least squares method is that the
residuals are independent and normally distributed with same parameters
(or, in case of weighted regression, the standard deviation of the
residual is known for every point). If this is the case, the parameters
that minimize the sum of
Instead of giving nls() start=0.01, give it a named vector of
parameters, start=c(theta=0.01).
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Nov 16, 2015 at 6:19 AM, roberto marrone
wrote:
> Dear all,
>
> I have a problem using the R finction nls. I am trying to perform an
> optimisation
Dear all,
I have a problem using the R finction nls. I am trying to perform an
optimisation of the volatility parameter in the Black and Scholes formula. In
the function nls I wrote as a formula the call option price with the only
unknown parameter the volatility that I called theta. The code
You have not specified a nonlinear formula. There are no parameters to
estimate in the formula you provide, y1~dist. What is the nonlinear
relation you are trying to fit? Look at the help file for nls to see some
examples worked.
?nls
Jean
Gyanendra Pokharel wrote on 10/01/2012
10:27:23
Hi all,
I got following problem in fitting the data.
Any kind of suggestions are welcome
> beta <- 3.5
> d <- seq(0.1,62.5,0.1)
> y <- exp(-beta*d)
> y1 <- y
> x <- read.table("epidist.txt", header = TRUE)
> data.nls <- as.data.frame(cbind(y1,x))
> #attach(data.nls)
> nls.fit <- nls(y1~dist,data.
On 12-09-27 05:34 PM, Bert Gunter wrote:
> Good point, Ben.
>
> I followed up my earlier reply offline with a brief note to Benedikt
> pointing out that "No" was the wrong answer: "maybe, maybe not" would
> have been better.
>
> Nevertheless, the important point here is that even if you do get
>
Good point, Ben.
I followed up my earlier reply offline with a brief note to Benedikt
pointing out that "No" was the wrong answer: "maybe, maybe not" would
have been better.
Nevertheless, the important point here is that even if you do get
convergence, the over-parameterization means that the est
Bert Gunter gene.com> writes:
>
> On Thu, Sep 27, 2012 at 12:43 PM, Benedikt Gehr
> ieu.uzh.ch> wrote:
> > now I feel very silly! I swear I was trying this for a long time and it
> > didn't work. Now that I closed R and restarted it it works also on my
> > machine.
> >
> > So is the only proble
On Thu, Sep 27, 2012 at 12:43 PM, Benedikt Gehr
wrote:
> now I feel very silly! I swear I was trying this for a long time and it
> didn't work. Now that I closed R and restarted it it works also on my
> machine.
>
> So is the only problem that my model is overparametrized with the data I
> have?
P
now I feel very silly! I swear I was trying this for a long time and it
didn't work. Now that I closed R and restarted it it works also on my
machine.
So is the only problem that my model is overparametrized with the data I
have? however shouldn't it be possible to fit an nls to these data?
On 27-09-2012, at 21:15, Benedikt Gehr wrote:
> thanks for your reply
>
> I agree that an lm model would fit just as well, however the expectation from
> a mechanistic point of view would be a non-linear relationship.
>
> Also when I "simulate" data as in
>
> y_val<-115-118*exp(-0.12*(seq(1,
thanks for your reply
I agree that an lm model would fit just as well, however the expectation
from a mechanistic point of view would be a non-linear relationship.
Also when I "simulate" data as in
y_val<-115-118*exp(-0.12*(seq(1,100)+rnorm(100,0,0.8)))
x_val<-seq(1:100)
plot(y_val~x_val)
sum
My guess:
You probably are overfitting your data. A straight line does about as
well as anything except for the 3 high leverage points, which the
minimization is probably having trouble with.
-- Bert
On Thu, Sep 27, 2012 at 10:43 AM, Benedikt Gehr
wrote:
> quantiles<-c(seq(.05,.95,0.05))
> sl
Hi
I would like to fit a non-linear regression to the follwoing data:
quantiles<-c(seq(.05,.95,0.05))
slopes<-c( 0.00e+00, 1.622074e-04 , 3.103918e-03 , 2.169135e-03 ,
9.585523e-04
,1.412327e-03 , 4.288103e-05, -1.351171e-04 , 2.885810e-04 ,-4.574773e-04
, -2.368968e-03, -3.104634e-03, -5
On Wed, May 2, 2012 at 3:32 PM, Michal Figurski
wrote:
> Dear R-Helpers,
>
> I'm working with immunoassay data and 5PL logistic model. I wanted to
> experiment with different forms of weighting and parameter selection, which
> is not possible in instrument software, so I turned to R.
>
> I am usin
Thanks, Keith.
I failed to cc the following reply to John Nash to the list. Your
email persuaded me that it might be useful to do so.
None of this changes the fact that the model is overfitted. You may be
able to get convergence to some set of parameter estates, but they
won't have much meaning s
> ?nls.control
> fit<- nls(MFI~a + b/((1+(nom/c)^d)^f), data=x, weights=x$weights,
+ start=c(a=100, b=1, c=100, d=-1, f=1),
control=nls.control(warnOnly=TRUE))
Warning message:
In nls(MFI ~ a + b/((1 + (nom/c)^d)^f), data = x, weights = x$weights, :
step factor 0.000488281 reduced below '
Bert,
Thank you for your thoughts.
I can assure you I have plotted the data back and forth many times, and
that overfitting has nothing to do with it. This is not a _statistical_
problem, but a _technical_ problem. Something that works well in ANY
reliable statistical software doesn't work in
Plot the data. You're clearly overfitting.
(If you don't know what this means or why it causes the problems you
see, try a statistical help list or consult your local statistician).
-- Bert
On Wed, May 2, 2012 at 12:32 PM, Michal Figurski
wrote:
> Dear R-Helpers,
>
> I'm working with immunoassa
Dear R-Helpers,
I'm working with immunoassay data and 5PL logistic model. I wanted to
experiment with different forms of weighting and parameter selection,
which is not possible in instrument software, so I turned to R.
I am using R 2.14.2 under Win7 64bit, and the 'nls' library to fit the
m
From: hammadi jbeli
Date: Tue, 26 Jan 2010 23:40:47 +0100
I have used R formulation style and I found this in some R documentations.
Sorry, that makes no sense. I would recommend you go back to your
original dataset and pick a very small subset of it--with only 2
variables, for example.
I have used R formulation style and I found this in some R documentations.
On Tue, Jan 26, 2010 at 4:12 AM, Walmes Zeviani
wrote:
>
> I supose you are following the SAS formulation style. R has a different
> formulation style, such as:
>
> da <- expand.grid(A=factor(1:3), x=1:10)
> da$y <- as.num
Dear R users,
I have a response variable in a csv file called "y" and a matrix of
predictor variables in a csv file called "mat". I have used the function
"nls" I have specified the nonlinear relation between these variable.The
code I have witten is called Rprog which begins with the phrase:
L.mino
I supose you are following the SAS formulation style. R has a different
formulation style, such as:
da <- expand.grid(A=factor(1:3), x=1:10)
da$y <- as.numeric(da$A)*da$x/(1.2+da$x)+rnorm(da$x, 0, 0.1)
m0 <- nls(y~Asym[A]*x/(Time[A]+x), data=da, start=list(Asym=c(1,2,3),
Time=c(1,1,1)))
summary(
Dear R users,
I have a response variable in a csv file called "y" and a matrix of
predictor variables in a csv file called "mat". I have used the function
"nls" I have specified the nonlinear relation between these variable.The
code I have witten is called Rprog which begins with the phrase:
L.mino
28 matches
Mail list logo