R : Copyright 2003, The R Development Core Team Version 1.7.1 (2003-06-16) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type `license()' or `licence()' for distribution details. R is a collaborative project with many contributors. Type `contributors()' for more information. Type `demo()' for some demos, `help()' for on-line help, or `help.start()' for a HTML browser interface to help. Type `q()' to quit R. > dat <- read.table("/home/pauljohn/Research/DriversLicense/fatalLicenses.txt",header=T) > boxcox((fatals+21) ~ log(licenses), data=dat, plotit=T,xlab="lambda when alpha=21.0", lambda=seq(-1,2, length=1000)) Error: couldn't find function "boxcox" > library(MASS) > boxcox((fatals+21) ~ log(licenses), data=dat, plotit=T,xlab="lambda when alpha=21.0", lambda=seq(-1,2, length=1000)) > postscript(file="olderBoxResult.eps", width=5.5,height=5.5,onefile=F,horizontal=F) > postscript(file="olderBoxResultCorrected.eps", width=5.5,height=5.5,onefile=F,horizontal=F) > boxcox((fatals+21) ~ log(licenses), data=dat, plotit=T,xlab="lambda when alpha=21.0", lambda=seq(-1,2, length=1000)) > dev.off() X11 2 > boxcox((fatals+21) ~ log(licenses), data=dat, plotit=T,xlab="lambda when alpha=21.0", lambda=seq(-1,2, length=1000),main="boxcod(fatals+21~log(licenses)) Error: syntax error > boxcox((fatals+21) ~ log(licenses), data=dat, plotit=T,xlab="lambda when alpha=21.0", lambda=seq(-1,2, length=1000),main="boxcod(fatals+21~log(licenses)") Warning message: Extra arguments "boxcod(fatals+21~log(licenses)" are just disregarded. in: lm.fit(x, y, offset = offset, ...) > boxcox((fatals+21) ~ log(licenses), data=dat, plotit=T,xlab="lambda when alpha=21.0", lambda=seq(-1,2, length=1000),main="boxcox(fatals+21~log(licenses))") Warning message: Extra arguments "boxcox(fatals+21~log(licenses))" are just disregarded. in: lm.fit(x, y, offset = offset, ...) > boxcox((fatals+21) ~ log(licenses), data=dat, plotit=T,xlab="lambda when alpha=21.0", lambda=seq(-1,2, length=1000),main="fdsa") Warning message: Extra arguments "fdsa" are just disregarded. in: lm.fit(x, y, offset = offset, ...) > > plot(fatals~licenses, data=dat, main="1988 Older Driver Fatalities and Licenses across States", xlab="Licensed Older Drivers", ylab="Older Driver Fatalities") > > > > plot(fatals~licenses, data=dat, main="1988 Older Driver Fatalities and Licenses across States", xlab="Licensed Older Drivers", ylab="Older Driver Fatalities") > plot(fatals~licenses, data=dat, main="1988 Older Driver Fatalities \n and Older Licenses", xlab="Licensed Older Drivers", ylab="Older Driver Fatalities") > objects() [1] "dat" "last.warning" > plot(fatals~licenses) Error in eval(expr, envir, enclos) : Object "fatals" not found > plot(fatals~licenses, data=dat) > x11(height=5.5, width=5.5) > plot(fatals~licenses, data=dat, main="1988 Older Driver Fatalities \n and Older Licenses", xlab="Licensed Older Drivers", ylab="Older Driver Fatalities") > dev.copy2eps(file="olderFatals1.eps") X11 2 > plot(log(fatals)~log(licenses), data=dat, main="1988 Older Driver Fatalities (log) \n and Licenses (log) across States", xlab="log(Licensed Older Drivers)", ylab="log(Older Driver Fatalities)") > dev.copy2eps(file="olderFatals2.eps") X11 2 > plot(log(fatals+191.0)~log(licenses), data=dat, main="1988 Older Driver Fatalities (shifted log)\n and Licenses (log) across States", xlab="log(Licensed Older Drivers)", ylab="log(Older Driver Fatalities+191.0)") > dev.off() null device 1 > x11(height=4.5, width=4.5) > plot(log(fatals+191.0)~log(licenses), data=dat, main="1988 Older Driver Fatalities (shifted log)\n and Licenses (log) across States", xlab="log(Licensed Older Drivers)", ylab="log(Older Driver Fatalities+191.0)") > dev.copy2eps(file="olderFatals3.eps") dev.copy2eps(file="olderFatals3.eps") X11 2 > > plot(fatals~licenses, data=dat, main="1988 Older Driver Fatalities \n and Older Licenses", xlab="Licensed Older Drivers", ylab="Older Driver Fatalities") > postscript(file="olderFatals1.eps", width=4.5,height=4.5) > plot(fatals~licenses, data=dat, main="1988 Older Driver Fatalities \n and Older Licenses", xlab="Licensed Older Drivers", ylab="Older Driver Fatalities") > dev.off() X11 2 > postscript(file="olderFatals1.eps", width=4.5,height=4.5,horizontal=F,oneFile=T) Error in check.options(new = new, name.opt = ".PostScript.Options", reset = FALSE, : invalid argument name(s) `oneFile' in "postscript(file = "olderFatals1.eps", width = 4.5, height = 4.5, " > postscript(file="olderFatals1.eps", width=4.5,height=4.5,horizontal=F,oneFile=T) Error in check.options(new = new, name.opt = ".PostScript.Options", reset = FALSE, : invalid argument name(s) `oneFile' in "postscript(file = "olderFatals1.eps", width = 4.5, height = 4.5, " > postscript(file="olderFatals1.eps", width=4.5, height=4.5,horizontal=F,oneFile=T) Error in check.options(new = new, name.opt = ".PostScript.Options", reset = FALSE, : invalid argument name(s) `oneFile' in "postscript(file = "olderFatals1.eps", width = 4.5, height = 4.5, " > postscript(file="olderFatals1.eps", width=4.5, height=4.5,horizontal=F,onefile=T) > plot(fatals~licenses, data=dat, main="1988 Older Driver Fatalities \n and Older Licenses", xlab="Licensed Older Drivers", ylab="Older Driver Fatalities") > dev.off() X11 2 > postscript(file="olderFatals2.eps", width=4.5, height=4.5,horizontal=F,onefile=T) > plot(log(fatals)~log(licenses), data=dat, main="1988 Older Driver Fatalities (log) \n and Licenses (log) across States", xlab="log(Licensed Older Drivers)", ylab="log(Older Driver Fatalities)") > dev.off function (which = dev.cur()) { if (which == 1) stop("Cannot shut down device 1 (the null device)") if (exists(".Devices")) { .Devices <- get(".Devices") } else { .Devices <- list("null device") } .Devices[[which]] <- "" assign(".Devices", .Devices) .Internal(dev.off(as.integer(which))) assign(".Device", .Devices[[dev.cur()]]) dev.cur() } > dev.off() X11 2 > postscript(file="olderFatals3.eps", width=4.5, height=4.5,horizontal=F,onefile=T) > plot(log(fatals+191.0)~log(licenses), data=dat, main="1988 Older Driver Fatalities (shifted log)\n and Licenses (log) across States", xlab="log(Licensed Older Drivers)", ylab="log(Older Driver Fatalities+191.0)") > dev.off() X11 2 > postscript(file="olderFatals4.eps", width=4.5, height=4.5,horizontal=F,onefile=T) > plot(log(fatals+21.0)~log(licenses), data=dat, main="1988 Older Driver Fatalities (shifted log) \n and Licenses (log) across States", xlab="log(Licensed Older Drivers+21.0)", ylab="log(Older Driver Fatalities)") > dev.off() X11 2 > postscript(file="boxcox3.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > boxcox((fatals+21) ~ licenses, data=dat, plotit=T,xlab="lambda when alpha=21.0", lambda=seq(-1,2, length=1000)) > dev.off() X11 2 > postscript(file="boxcox4.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > boxcox((fatals+21) ~ log(licenses), data=dat, plotit=T,xlab="lambda when alpha=21.0 log (licenses)", lambda=seq(-1,2, length=1000)) > dev.off() X11 2 > postscript(file="boxcox1.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > boxcox((fatals+21) ~ licenses, data=dat, plotit=T,xlab="lambda, fatals~licenses", lambda=seq(-1,2, length=1000)) > dev.off() X11 2 > postscript(file="boxcox2.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > dev.off() X11 2 > postscript(file="boxcox1.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > boxcox((fatals) ~ licenses, data=dat, plotit=T,xlab="lambda, fatals~licenses", lambda=seq(-1,2, length=1000)) > dev.off() X11 2 > postscript(file="boxcox2.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > boxcox((fatals+191) ~ licenses, data=dat, plotit=T, xlab="lambda, (fatalities+191)~licenses") > dev.off() X11 2 > postscript(file="boxcox3.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > boxcox((fatals+21) ~ licenses, data=dat, plotit=T,xlab="lambda, fatalities+21.0~licenses", lambda=seq(-1,2, length=1000)) > dev.off() X11 2 > postscript(file="boxcox4.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > boxcox((fatals+21) ~ log(licenses), data=dat, plotit=T,xlab="lambda, fatalities+ 21.0~ log (licenses)", lambda=seq(-1,2, length=1000)) > dev.off() X11 2 > postscript(file="olderFatals4.eps", width=4.5, height=4.5,horizontal=F,onefile=F) > plot(log(fatals+21.0)~log(licenses), data=dat, main="1988 Older Driver Fatalities (shifted log) \n and Licenses (log) across States", xlab="log(Licensed Older Drivers+21.0)", ylab="log(Older Driver Fatalities)") > dev.off() X11 2 > postscript(file="olderFatals3.eps", width=4.5, height=4.5,horizontal=F,onefile=F) > plot(log(fatals+191.0)~log(licenses), data=dat, main="1988 Older Driver Fatalities (shifted log)\n and Licenses (log) across States", xlab="log(Licensed Older Drivers)", ylab="log(Older Driver Fatalities+191.0)") > dev.off() X11 2 > postscript(file="olderFatals2.eps", width=4.5, height=4.5,horizontal=F,onefile=F) > plot(log(fatals+21.0)~log(licenses), data=dat, main="1988 Older Driver Fatalities (shifted log) \n and Licenses (log) across States", xlab="log(Licensed Older Drivers+21.0)", ylab="log(Older Driver Fatalities)") > dev.off() X11 2 > postscript(file="olderFatals1.eps", width=4.5, height=4.5,horizontal=F,onefile=F) > postscript(file="olderFatals1.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > plot(fatals~licenses, data=dat, main="1988 Older Driver Fatalities \n and Older Licenses", xlab="Licensed Older Drivers", ylab="Older Driver Fatalities") > dev.off() X11 2 > postscript(file="olderFatals2.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > plot(log(fatals)~log(licenses), data=dat, main="1988 Older Driver Fatalities (log) \n and Licenses (log) across States", xlab="log(Licensed Older Drivers)", ylab="log(Older Driver Fatalities)") > dev.off() X11 2 > postscript(file="olderFatals3.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > plot(log(fatals+191.0)~log(licenses), data=dat, main="1988 Older Driver Fatalities (shifted log)\n and Licenses (log) across States", xlab="log(Licensed Older Drivers)", ylab="log(Older Driver Fatalities+191.0)") > dev.off() X11 2 > postscript(file="olderFatals4.eps", width=4.5,height=4.5,onefile=F,horizontal=F) > plot(log(fatals+21.0)~log(licenses), data=dat, main="1988 Older Driver Fatalities (shifted log) \n and Licenses (log) across States", xlab="log(Licensed Older Drivers)", ylab="log(Older Driver Fatalities+21)") > dev.off() X11 2 >