[R] writing equations

Antonio Olinto aolinto at bignet.com.br
Fri May 4 22:17:34 CEST 2001


Dear R-list members,

I have a data frame with two columns (X, Y). How can I write the following
equation (using nls)

log(X2/X1) ~ a + b * (Y1+Y2)/2 + c * (X1+X2)/2

To calculate the fitted values for each line (Xi) I have to use numbers in
consecutive lines (Xi, Xi+1, Yi and Yi+1).

Thanks,

Antonio Olinto



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list