search for: carmileagedata

Displaying 1 result from an estimated 1 matches for "carmileagedata".

2014 Apr 21
3
Loops (run the same function per different columns)
Hi, Using the example data from library(gvlma) library(gvlma) data(CarMileageData) CarMileageNew <- CarMileageData[,c(5,6,3)] ?lst1 <- list() ?y <- c("NumGallons", "NumDaysBetw") ?for(i in seq_along(y)){ ?lst1[[i]] <- gvlma(lm(get(y[i])~MilesLastFill,data=CarMileageNew)) ?lst1} pdf("gvlmaplot.pdf") ?lapply(lst1,plot) dev.off() You coul...