search for: sal87

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

Did you mean: sal
2009 Apr 02
1
calculating drop1 R^2s
...et the RSS from drop1(), and the r.squared from summary() for a given model, but don't know how to use the result of drop1() to get the r.squared for each model with one term dropped. Working example: library(vcd) # for Baseball library(car) # for vif/recode data(Baseball) # sal87 appears as a factor because missing is coded as '.' rather than NA Baseball$sal87 <- as.numeric(recode(Baseball$sal87, "'.'=NA")) Baseball$logsal <- log(Baseball$sal87) base.mod <- lm(logsal ~ years+atbat+hits+homeruns+runs+rbi+walks, data=Baseball) vif(base.mod...