"Hiroto Miyoshi" <[EMAIL PROTECTED]> writes:

> Could anyone help me please?
>
> --small example
>> library(MASS)
>> x1<-runif(100)
>> x2<-runif(100)
>> x3<-runif(100)
>> x4<-runif(100)
>> x5<-runif(100)
>> y<-x1+x2+x3+runif(100)
>> t<-data.frame(y=y,x1=x1,x2=x2,x3=x3,x4=x4,x5=x5)

It is going to be very unhappy if it tries to call the t() transpose
function.   Please rename this variable and try again.

>> x<-lm(y~x1+x2+x3+x4+x5,data=t)
>> stepAIC(x)
> Start:  AIC= -247.61
>  y ~ x1 + x2 + x3 + x4 + x5
>
>        Df Sum of Sq      RSS      AIC
> - x5    1 3.747e-06    7.456 -249.608
> - x4    1     0.026    7.483 -249.254
> <none>                 7.456 -247.609
> - x1    1     4.866   12.322 -199.375
> - x2    1     8.182   15.639 -175.543
> - x3    1     8.597   16.054 -172.922
> Error in as.data.frame.default(data) : can't coerce function into a
> data.frame


best,
-tony

-- 
[EMAIL PROTECTED]            http://www.analytics.washington.edu/ 
Biomedical and Health Informatics   University of Washington
Biostatistics, SCHARP/HVTN          Fred Hutchinson Cancer Research Center
UW (Tu/Th/F): 206-616-7630 FAX=206-543-3461 | Voicemail is unreliable
FHCRC  (M/W): 206-667-7025 FAX=206-667-4812 | use Email

CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}

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

Reply via email to