Is there some reason that the simple & obvious does not work or is in some way not adequate?

> data <- data.frame(x=c(1:5), y=c(1,3,2,NA,4))
> nls(y ~ A*x^2 +sqrt(0.08*A)*x, data=data, start=list(A=0))
Nonlinear regression model
  model:  y ~ A * x^2 + sqrt(0.08 * A) * x
   data:  data
        A
0.1577584
 residual sum-of-squares:  5.445525
>

At Thursday 07:54 PM 11/13/2003 +0100, JB wrote:
At 13.11.2003 (17:17), Roger D. Peng wrote:
You could use nls() or optimize().

-roger

Well, thx. This is very complicated. In Mupad I simply say:

r:=stats::reg(t_list,x_list,a/2*t^2+sqrt(0.08*a)*t,[t],[a])

and get the (right) answer. How would the same command in R go?

TIA,

jb

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to