Re: [R] formula and lm

From: Spencer Graves <>
Date: Fri 16 Jul 2004 - 06:02:00 EST

It wants to compute a*x given a and x, and then use ordinarly least squares to estimate b0 and b1 in y = b0 + b1*I(a*x). If that is what you intend, you must supply a. If you want to estimate a, e.g., with no constant, use y~x-1. Does this answer the question? hope this helps. spencer graves wrote:

>Hi, don' t understand why the function fomula have this error, i enclose
>the parameter "a" with the function I()
>Thank Ruben
> x<-1:5
>y<-c( 2 ,4 , 6 , 8 ,11)
>Error in unique(c("AsIs", oldClass(x))) : Object "a" not found
> mailing list
>PLEASE do read the posting guide!
> mailing list PLEASE do read the posting guide! Received on Fri Jul 16 06:09:40 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:00 EST