Another question: What do you know or assume about the distribution
of "e"? If (y-x) is always positive, the survival package, especially
the survreg function, might help you. For this, I found especially
helpful the discussion of this in Venables and Ripley (2002) Modern
Applied Statisti
Hi Angelo,
have a look at the following example which uses 'gls' in the nlme package.
library(nlme)
x <- runif(100, 0, 1)
y <- x + exp(4*x)*rnorm(100, 0, 2)
gls(y~x, correlation = varExp(form=~x))
For details see ?gls and ?varExp.
Christian
__
R-help@stat
What do you want to minimize? Can you write a function to compute
eps given x, y, and a? Given that, you can then write another function
to compute the objective function you want to minimize. If "a" is a
scalar, compute the objective function for a range of values of "a" and
plot. If
You are right. eps in my model is not a parameter but the error term.
Also the linearization doesn't solve the problem, since sometimes you
cannot take logs. Any other ideas?
Thanks
On Fri, 18 Mar 2005 11:21:12 -0500
"Liaw, Andy" <[EMAIL PROTECTED]> wrote:
> That's treating eps as a parameter i
That's treating eps as a parameter in the model. If I read your question
right, that's not what you want.
Andy
> From: ronggui [mailto:[EMAIL PROTECTED]
>
> then is the nls function can deal the problem as Guillaume
> STORCHI mentioned in the last post? [X<-nls(y~x+exp(a*x)*eps,
> data=,st
then is the nls function can deal the problem as Guillaume STORCHI mentioned in
the last post? [X<-nls(y~x+exp(a*x)*eps, data=,start=list(a=,eps=))]
or just can solve the problem as:log(y-x) = a*x + e?
On Fri, 18 Mar 2005 08:56:38 -0500
"Liaw, Andy" <[EMAIL PROTECTED]> wrote:
> AFAIK most mode
AFAIK most model fitting techniques will only deal with additive errors, not
multiplicative ones. You might want to try fitting:
log(y-x) = a*x + e
which is linear.
Andy
> From: Angelo Secchi
>
> Hi,
> is there a way in R to fit a non linear model like
>
> y=x+exp(a*x)*eps
>
> where a is t