Dear R-experts,

Here is my R code, I get a result but I also get an error message so I doubt I 
can trust the result I get. 
What is going wrong ? Many thanks.

########################################
a<-c(2,4,3,4,6,5,3,1,2,3,4,3,4,5,65)
b<-c(23,45,32,12,23,43,56,44,33,11,12,54,23,34,54)
d<-c(9,4,5,3,2,1,3,4,5,6,4,9,10,11,18)

my.experiment <- function( ) {

OLS <- lm( a ~ b+d )
MSE_OLS<-mean(OLS$residuals^2)
return( c(MSE_OLS) )
}

my.data = t(replicate( 500, my.experiment() ))
colnames(my.data) <- c("MSE_OLS")
mean(my.data)
########################################
 

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to