RDX2 X  g6.1 source function(device="") { @ if(device!="")hardcopy(width=2.25, height=2.25, device=device) A oldpar<-par(mar=c(4.1,4.1,2.1,1.1), mgp=c(2.5,0.75,0), pty="s")  on.exit(par(oldpar))  xy<-par()$usr[c(1,4)]  attach(allbacks)  xlim <- range(volume) ' xlim <- xlim+c(-.075,.075)*diff(xlim) 9 ## Plot of weight vs volume: data frame allbacks (DAAG) M plot(weight ~ volume, data=allbacks, pch=c(16,1)[unclass(cover)], lwd=1.25,  xlim=xlim) @ ## unclass(cover) gives the integer codes that identify levels = ## As text() does not accept the parameter data, use with()  ## to specify the data frame. P with(allbacks,text(weight ~ volume, labels=paste(1:15), cex=0.75, offset=0.35, 1 pos=c(2,4)[unclass(cover)]))  par(xpd=TRUE) G legend(x=660, y=1700, pch=c(16,1), legend=c("hardback ","softback"), 5 horiz=T, bty="n", xjust=0.5, x.intersp=0.75)  detach(allbacks)  if(device!="")dev.off() }ў§$ device ў { if !=џ ў hardcopy width@ height@џџўў <- oldpar par mar c@ffffff@ffffff@ЬЬЬЬЬЭ?ё™™™™™šў mgpџ@?шў pty sўў on.exit џ џўў џ xy [ $ џў usrўџ?№@ўўў attach allbacksў џ xlim range volumeўў џџ +џ *џ -?Г333333ў?Г333333ў diffџўўўў plot ~ weightџў dataџ pchџџ@0?№ў unclass coverўў lwd?єџџў withџ textџ џџў labels paste :?№@.ўў cex?ш offset?жffffff posџџ@@ў#џ$џўўўў џ xpd ў legend x@„  y@š"џџ@0?№ў/џџ hardback  softbackў horiz T bty n xjust?р x.intersp?шў detachџўџџџ ў dev.offўўў g6.10џ function(device="") { > if(device!="")hardcopy(width=5.5, height=3.5, device=device) 5 oldpar <- par(mfrow=c(2,4), mar=c(4.1,4.1,3.1,0.6), 8 mgp=c(2.0,.5,0),oma=c(0,0,1,2), pty="s")  on.exit(par(oldpar)) B hills.lm <- lm(log(time) ~ log(climb) + log(dist), data = hills) plot.new()  par(mfg=c(1,1)) J mtext(side=3, line=2.5, "A: Include observation 18 (Knock Hill)", adj=0) par(new=T)  plot(hills.lm, sub="", D caption=c("Resids vs Fitted", "Normal Q-Q", "Scale-Location", % "", "Resids vs Leverage")) E lmobj <- lm(log(time) ~ log(climb) + log(dist), data = hills[-18,]) k # plot(hills.lm, caption="A: Resids vs Fitted", which=1, sub="") plot.new() G mtext(side=3, line=2.5, "B: Omit observation 18 (Knock Hill)", adj=0) par(new=T)  plot(lmobj, sub="", D caption=c("Resids vs Fitted", "Normal Q-Q", "Scale-Location", F "", "Resids vs Leverage"), cex.main=1, cook.levels=c(.25,.5))  if(device!="")dev.off() invisible() }ў§$џ ўџџџџ ўџџ@ џ@ џџўў џ џ џ mfrowџ@@ў џџ@ffffff@ffffff@ЬЬЬЬЬЭ?у333333ўџџ@?рў omaџ?№@ўџ sўўџ џ џўў џ hills.lm lmџ log timeўџ>џ climbў>џ distўўў!џ hillsўў plot.newў џ mfgџ?№?№ўў mtext side@ line@ &A: Include observation 18 (Knock Hill) adjў џ new3џўџ<џ sub  captionџ Resids vs Fitted Normal Q-Q Scale-Location  Resids vs Leverageўў џ lmobj=џџ>џ?џўџ>џ@џў>џAџўўў!џџBџџ@2ўћўўўCџўEџFџ@Gџ@ #B: Omit observation 18 (Knock Hill)Hџў џIџ3џўџLџJџ Kџџ Resids vs Fitted Normal Q-Q Scale-Location  Resids vs Leverageў cex.main?№ cook.levelsџ?а?рўўџџџ ў8џўў invisibleўў g6.11џ !function(lmobj = NULL, device="") { : if(device!="")hardcopy(width=4, height=2, device=device) 5 oldpar <- par(mfrow=c(1,2), mar=c(4.1,4.1,2.1,1.1), : mgp=c(2.25,.75,0),oma=c(0,0,0,1), pty="s")  on.exit(par(oldpar)) L hills.loglm <- lm(log(time) ~ log(dist) + log(climb), data = hills[-18, ]) G lqsobj <- lqs(log(time) ~ log(climb) + log(dist), data = hills[-18,])  hat <- fitted(lqsobj)  res <- resid(lqsobj) ; plot(resid(hills.loglm), res, xlab="Residuals, lm model", # ylab="Residuals, lqs model")  abline(0,1, col=2) % mtext(side=3, line=0.5, "A", adj=0) N plot(hat, res, xlab="Fitted values, lqs model", ylab="Residuals, lqs model") $ mtext(side=3, line=0.5, "B", adj=0)  if(device!="")dev.off() invisible() }ў§Lџўџ ўџџџџ ўџџ@ џ@џџўў џ џ џ:џџ?№@ў џџ@ffffff@ffffff@ЬЬЬЬЬЭ?ё™™™™™šўџџ@?шў;џџ?№ўџ sўўџ џ џўў џ hills.loglm=џџ>џ?џўџ>џAџў>џ@џўўў!џџBџџ@2ўћўўў џ lqsobj lqsџ>џ?џўџ>џ@џў>џAџўўў!џџBџџ@2ўћўўў џ hat fittedRџўў џ res residRџўўџWџQџўVџ xlab Residuals, lm model ylab Residuals, lqs modelў abline?№ col@ўEџFџ@Gџ?р AHџўџTџVџXџ Fitted values, lqs modelYџ Residuals, lqs modelўEџFџ@Gџ?р BHџўџџџ ў8џўўOџўў g6.12џ$ 2function(y = hills$time[-18], pred = T, device="") { : if(device!="")hardcopy(width=2, height=2, device=device)  here<-rep(T,35) : here[18]<-F # All elements except the 18th are set to T 7 hills.logm <- lm(log(time) ~ log(dist) + log(climb), - data = hills, subset=here) : hills.ci<-exp(predict(hills.logm,interval="confidence"))   low <- hills.ci[,"lwr"]  hi <- hills.ci[,"upr"]  x<-hills.ci[,"fit"]  ylim <- range(c(y, low, hi)) < titl <- paste("Observed versus predicted values, for the", < "\nhill race data. The line y=x is shown.", @ "\nThe horizontal limits of the bounding lines", < "\nare 95% pointwise confidence limits for", , "\npredicted times.",sep="") ? oldpar <- par(mar = c(4.1,4.1,1.1,1.1), mgp = c(2.5, 0.75, 0)  )  on.exit(par(oldpar))  r <- cor(x, y) H plot(x, y, xlab = "Predicted time", ylab = "Observed time", type="n",  ylim = ylim)  abline(0, 1)  ord <- order(x) ) lines(low[ord], x[ord], col = "grey60") ( lines(hi[ord], x[ord], col = "grey60")  points(x, y, pch=16, cex=0.5)  topleft <- par()$usr[c(1, 4)]  chw <- par()$cxy[1]  chh <- par()$cxy[2]  cat(titl,"\n")  if(device!="")dev.off()  invisible(hills.logm) }ў§1џџџBџ timeўџ@2ўў pred3џџ ўџџџџ ўџџ@ џ@џџўў џ here rep3џ@A€ўў џџ^џ@2ў Fў џ hills.logm=џџ>џ?џўџ>џAџў>џ@џўўў!џBџ subset^џўў џ hills.ci exp predictaџ interval confidenceўўў џ lowџcџћ lwrўў џ hiџcџћ uprўў џ0џџcџћ fitўў џ ylimџџ1џgџhџўўў џ titl)џ )Observed versus predicted values, for the ( hill race data. The line y=x is shown. , The horizontal limits of the bounding lines ( are 95% pointwise confidence limits for  predicted times. sep ўў џ џ џ џџ@ffffff@ffffff?ё™™™™™š?ё™™™™™šўџџ@?шўўўџ џ џўў џ r cor0џ1џўўџ0џ1џXџ Predicted timeYџ Observed time type niџiџўZџ?№ў џ ord order0џўў linesџgџoџўџ0џoџў[џ grey60ўqџџhџoџўџ0џoџў[џ grey60ў points0џ1џ"џ@0+џ?рў џ topleftџџ џў usrўџ?№@ўўў џ chwџџ џў cxyў?№ўў џ chhџџ џў cxyў@ўў catjџ  ўџџџ ў8џўўOџaџўў g6.13џ function(device=""){ 7 if(device!="")hardcopy(width=3.25, height=3.25, 8 device=device, pointsize=9) $ logoddbooks <- log(oddbooks) O pairs(log(oddbooks), labels=c("thick\n\nlog(mm)", "breadth\n\nlog(cm)", 7 "height\n\nlog(cm)", "weight\n\nlog(g)")) B figtxt<-paste("Scatterplot matrix for the oddbooks data.")  print(figtxt)  if(device!="")dev.off()  invisible()  }ў§џ ўџџџџ ўџџ@  џ@ џџ pointsize@"ўў џ logoddbooks>џ oddbooksўў pairs>џzџў(џџ thick log(mm) breadth log(cm) height log(cm) weight log(g)ўў џ figtxt)џ )Scatterplot matrix for the oddbooks data.ўў print|џўџџџ ў8џўўOџўў g6.14џ function(device=""){ > if(device!="")hardcopy(width=5, height=1.7, device=device) logoddbooks <- log(oddbooks) 7 oldpar <- par(mfrow=c(1,3), mar=c(4.1,4.1,1.6,2.1), < mgp=c(2.5,.75,0), oma=c(0,0,0,0), pty="s")  on.exit(par(oldpar))  attach(logoddbooks) , u1 <- lm(weight~I(thick+breadth+height)) ( plot(weight~I(thick+breadth+height), H xlab="log(thick)+log(breadth)+log(height)", ylab="log(weight)")  abline(u1) ' mtext(side=3,line=0.25, "A", adj=0) , u2 <- lm(weight~thick+I(breadth+height)) 9 plot(weight~fitted(u2), xlab="Predicted log(weight)",  ylab="log(weight)")  abline(0,1) ' mtext(side=3,line=0.25, "B", adj=0) ) u3 <- lm(weight~thick+breadth+height) 9 plot(weight~fitted(u2), xlab="Predicted log(weight)",  ylab="log(weight)")  abline(0,1) ' mtext(side=3,line=0.25, "C", adj=0)  if(device!="")dev.off()  }ў§$џ ўџџџџ ўџџ@ џ?ћ333333џџўў џyџ>џzџўў џ џ џ:џџ?№@ў џџ@ffffff@ffffff?љ™™™™™š@ЬЬЬЬЬЭўџџ@?шў;џџўџ sўўџ џ џўўџyџў џ u1=џџ џ Iџџ thick breadthў џўўўўўџџ џ€џџџџ‚џў џўўўXџ #log(thick)+log(breadth)+log(height)Yџ log(weight)ўZџџўEџFџ@Gџ?а AHџў џ u2=џџ џџџ€џџ‚џ џўўўўўўџџ џUџƒџўўXџ Predicted log(weight)Yџ log(weight)ўZџ?№ўEџFџ@Gџ?а BHџў џ u3=џџ џџџџ‚џў џўўўўџџ џUџƒџўўXџ Predicted log(weight)Yџ log(weight)ўZџ?№ўEџFџ@Gџ?а CHџўџџџ ў8џўўў g6.15џ function(device=""){ 3 if(device!="")hardcopy(width=2.75, height=2.75, 6 device=device, pointsize=9)  attach(oddbooks)  area <- breadth*height  volume <- area*thick  density <- weight/volume 5 pairs(cbind(log(density), log(area), log(thick)), > labels=c("log(density)", "log(area)", "log(thick)"))  detach(oddbooks) 9 figtxt<-paste("Data derived from the oddbooks data.")  print(figtxt)  if(device!="")dev.off()  invisible()  }ў§$џ ўџџџџ ўџџ@ џ@џџxџ@"ўўџzџў џ areaџ‚џ џўў џџџ†џџўў џ density / џџўў{џ cbind>џ‡џў>џ†џў>џџўў(џџ log(density) log(area) log(thick)ўў7џzџў џ|џ)џ $Data derived from the oddbooks data.ўў}џ|џўџџџ ў8џўўOџўў g6.16џ function(device=""){ 5 if(device!="")hardcopy(width=4.5, height=4.5, G device=device, pointsize=8) if(!exists("carprice")){  require(MASS)  data(Cars93) & US <- Cars93$Origin=="USA" J carprice <- Cars93[US, c("Type", "Min.Price","Price","Max.Price")] F carprice$Range.Price <- carprice$Max.Price - carprice$Min.Price = carprice$Range.Price <- round(carprice$Range.Price, 1) E carprice$RoughRange <- carprice$Range.Price+rnorm(48, sd=0.01) ; carprice$RoughRange <- round(carprice$RoughRange, 2) G avMPG <- apply(Cars93[US, c("MPG.city","MPG.highway")], 1, mean) - carprice$gpm100 <- round(100/avMPG, 1) F cat("Data set has been reconstructed. Calculations involving", G "\nRoughRange will give different results from those obtained", C "\n using the data set carprice in the DAAG package.","\n") } + pairs(carprice[,2:7], oma=rep(2,4))  if(device!="")dev.off()  }ў§џ ўџџџџ ўџџ@ џ@џџxџ@ ўўџ ! exists carpriceўўџ require MASSў!џ Cars93ў џ US ==џџ Originў USAўў џ carpriceџџџџ Type Min.Price Price Max.Priceўўў џџ“џ Range.Priceўџџ“џ Max.Priceўџ“џ Min.Priceўўў џџ“џ”џў roundџ“џ”џў?№ўў џџ“џ RoughRangeўџџ“џ”џў rnorm@H sd?„zсGЎ{ўўў џџ“џ˜џў—џџ“џ˜џў@ўў џ avMPG applyџџџџ MPG.city MPG.highwayўў?№ meanўў џџ“џ gpm100ў—џˆџ@Y›џў?№ўўvџ 8Data set has been reconstructed. Calculations involving ; RoughRange will give different results from those obtained 2 using the data set carprice in the DAAG package.  ўўў{џџ“џћ*џ@@ўў;џ_џ@@ўўџџџ ў8џўўў g6.17џ4 :function(mu=20, n=100,a=15, b=2.5, sigma=12.5, device=""){ 3 if(device!="")hardcopy(width=3.75, height=2.75, 6 device=device, pointsize=8) if(F){  errorsINx <- ? function(mu = 20, n = 100, a = 15, b = 2.5, sigma = 12.5, % timesSigma=(1:5)/2.5){ ; mat <- matrix(0, nrow=n, ncol=length(timesSigma)+2) % x0 <- mu*exp(rnorm(n,1,0.15)) & y <- a + b*x0+rnorm(n,0,sigma) ( mat[, length(timesSigma)+2] <- y  mat[,1] <- x0  sx <- sd(x0)  k <- 1  for(i in timesSigma){  k <- k+1 $ x1 <- x0+rnorm(n, 0, sx*i)  mat[, k] <- x1 } mat  }  } < oldpar <- par(mar=c(3.6,3.1,1.6,0.6), mgp=c(2.5,0.75,0), # oma=c(1,1,0.6,1), ( mfrow=c(2,3), pty="s") O mu <- 20; n <- 100; a <- 15; b <- 2.5; sigma <- 12.5; timesSigma<-(1:5)/2.5 C mat <- errorsINx(mu = 20, n = 100, a = 15, b = 2.5, sigma = 5, ( timesSDx=(1:5)/2.5) " beta <- numeric(dim(mat)[2]-1)  sx <- sd(mat[,2])  y <- mat[, 1]  for(j in 1:length(beta)){  xj <- mat[,j+1] 2 plot(y ~ xj, xlab="", ylab="", col="gray30")  if(j==1) 6 mtext(side=3, line=0.5, "No error in x") else{  xm <- timesSigma[j-1] J mtext(side=3, line=0.5, substitute(tau == xm*s[z], list(xm=xm))) } ( if(j>=4)mtext(side=1, line=2, "x") - if(j%%3 == 1)mtext(side=2, line=2, "y")  errors.lm <- lm(y ~ xj)  abline(errors.lm) # beta[j] <- coef(errors.lm)[2] * bigsigma <- summary(errors.lm)$sigma  print(bigsigma/sigma)  abline(a, b, lty=2)  }  print(round(beta, 3))  if(device!="") dev.off()  }ў§ mu@4 n@Y a@. b@ sigma@)џ ўџџџџ ўџџ@ џ@џџxџ@ ўўџ`џџ џ errorsINx function џ@4Ёџ@YЂџ@.Ѓџ@Єџ@) timesSigmaˆџ (*џ?№@ўў@ўўџ џ mat matrix nrowЁџ ncolџ lengthЇџў@ўўў џ x0џ џdџ™џЁџ?№?У333333ўўўў џ1џџџЂџџЃџЎџўў™џЁџЄџўўў џџЉџћџ­џЇџў@ўў1џў џџЉџћ?№ўЎџў џ sxšџЎџўў џ k?№ў for iЇџџ џАџџАџ?№ўў џ x1џЎџ™џЁџџЏџВџўўўў џџЉџћАџўГџўўўЉџў 9function(mu = 20, n = 100, a = 15, b = 2.5, sigma = 12.5, % timesSigma=(1:5)/2.5){ ; mat <- matrix(0, nrow=n, ncol=length(timesSigma)+2) % x0 <- mu*exp(rnorm(n,1,0.15)) & y <- a + b*x0+rnorm(n,0,sigma) ( mat[, length(timesSigma)+2] <- y  mat[,1] <- x0  sx <- sd(x0)  k <- 1  for(i in timesSigma){  k <- k+1 $ x1 <- x0+rnorm(n, 0, sx*i)  mat[, k] <- x1 } mat  }ўўўў џ џ џ џџ@ ЬЬЬЬЬЭ@ЬЬЬЬЬЭ?љ™™™™™š?у333333ўџџ@?шў;џџ?№?№?у333333?№ў:џџ@@ўџ sўў џ џ@4ў џЁџ@Yў џЂџ@.ў џЃџ@ў џЄџ@)ў џЇџˆџЈџ*џ?№@ўў@ўў џЉџЅџ џ@4Ёџ@YЂџ@.Ѓџ@Єџ@ timesSDxˆџЈџ*џ?№@ўў@ўўў џ beta numericџџ dimЉџў@ў?№ўўў џЏџšџџЉџћ@ўўў џ1џџЉџћ?№ўўБџ j*џ?№­џЕџўўџ џ xjџЉџћџИџ?№ўўўџџ1џЙџўXџ Yџ [џ gray30ўџ‘џИџ?№ўEџFџ@Gџ?р No error in xўџ џ xmџЇџџИџ?№ўўўEџFџ@Gџ?р substitute‘џ tauџКџџ s zўўў listКџКџўўўўўџ >=Иџ@ўEџFџ?№Gџ@ xўўџ‘џ %%Иџ@ў?№ўEџFџ@Gџ@ yўў џ errors.lm=џџ1џЙџўўўZџТџў џџЕџИџўџ coefТџў@ўў џ bigsigmaџ summaryТџўЄџўў}џˆџФџЄџўўZџЂџЃџ lty@ўўў}џ—џЕџ@ўўџџџ ў8џўўў g6.2џ function(device="", stats=F){ @ if(device!="")hardcopy(width=5.5, height=1.4, device=device) 7 oldpar <- par(mfrow=c(1,4), mar=c(4.1,4.1,2.1,0.6), : mgp=c(2.0,.5,0),oma=c(0,0,0,1), pty="s")  on.exit(par(oldpar)) 8 allbacks.lm<-lm(weight~-1+volume+area,data=allbacks)  plot(allbacks.lm,caption= " c("A: Resids vs Fitted", 0 "B: Normal Q-Q", "C: Scale-Location", , "D: Cook's distance"), which=1:4) if(stats) ! print(summary(allbacks.lm))  if(device!="")dev.off()  invisible(allbacks.lm)  }ў§$џ  stats`џўџџџџ ўџџ@ џ?іffffffџџўў џ џ џ:џџ?№@ў џџ@ffffff@ffffff@ЬЬЬЬЬЭ?у333333ўџџ@?рў;џџ?№ўџ sўўџ џ џўў џ allbacks.lm=џџ џџџџ?№ўџў†џўў!џџўўџЩџKџџ A: Resids vs Fitted B: Normal Q-Q C: Scale-Location D: Cook's distanceў which*џ?№@ўўџШџ}џХџЩџўўўџџџ ў8џўўOџЩџўў g6.3џ function(device="", smooth=T){ I if(device!="")hardcopy(width=3, height=3, device=device, pointsize=9) B if(smooth)here.panel <- panel.smooth else here.panel <- points ! pairs(litters,cex.labels=1.2, F labels=c("lsize\n\n(litter size)","bodywt\n\n(Body Weight)", O "brainwt\n\n(Brain Weight)"), oma=rep(2,4), lower.panel=here.panel, ! upper.panel=here.panel) I figtxt<-paste("Scatterplot matrix for the litters data set.", sep="")  print(figtxt)  if(device!="")dev.off()  invisible()  }ў§џ  smooth3џўџџџџ ўџџ@ џ@џџxџ@"ўўџЬџ џ here.panel panel.smoothў џЭџrџўў{џ litters cex.labels?ѓ333333(џџ lsize (litter size) bodywt (Body Weight) brainwt (Brain Weight)ў;џ_џ@@ў lower.panelЭџ upper.panelЭџў џ|џ)џ ,Scatterplot matrix for the litters data set.kџ ўў}џ|џўџџџ ў8џўўOџўў g6.4џ0 function(device="") { + if(device!="")hardcopy(width=4, height=4, 1 device=device, pointsize=8) E titl <- "Brain Weight as a Function of Litter Size and Body Weight" : oldpar <- par(mfrow = c(2, 2), mar = c(5.1,4.1,2.1,2.1), . mgp = c(2, 0.5, 0), xpd=FALSE)  on.exit(par(oldpar)) @ plot(litters[, 1], litters[, 3], xlab = "Litter Size", ylab = $ "Brain Weight (g)", pch = 16) + u1 <- lm(brainwt ~ lsize, data = litters) cat("\n")  print(summary(u1)$coef) cat("\n")  se <- summary(u1)$coef[2, 2] B mtext(side = 3, line = 0.25, text = paste("brainwt =", round(u1$ ` coef[1], 2), "+", round(u1$coef[2], 5), "[SE =", round(se, 5), ; "]", "lsize"), cex = 0.65) D plot(litters[, 2], litters[, 3], xlab = "Body Weight (g)", ylab = $ "Brain Weight (g)", pch = 16) , u2 <- lm(brainwt ~ bodywt, data = litters)  print(summary(u2)$coef) cat("\n") B mtext(side = 3, line = 0.25, text = paste("brainwt =", round(u2$ _ coef[1], 2), "+", round(u2$coef[2], 4), "bodywt"), cex = 0.65) @ plot(litters[, 1], litters[, 2], xlab = "Litter Size", ylab = / "Body Weight (g)", pch = 16, mkh = 0.04) ' r3 <- cor(litters[, 1], litters[, 2]) I mtext(side = 3, line = 0.25, text = paste("Correlation =", round(r3, 2) / ), cex = 0.65) 3 u <- lm(brainwt ~ lsize + bodywt, data = litters)  print(summary(u)$coef)  hat <- fitted(u) = plot(hat, litters[, 3], xlab = "Fitted Weight (g)", ylab = * "Brain Weight (g)", pch = 1, lwd=2)  se <- summary(u)$coef[2, 2]  se1 <- summary(u)$coef[3, 2]  mtext(side = 3, line = 0.5, ! text = paste("brainwt =", 9 round(u$ coef[1], 2), "+", round(u$coef[2], 4), 3 "[SE =", round(se, 4), "] ", "lsize \n+", < round(u$coef[3], 4), "[SE =", round(se1, 4), "] ", ' "bodywt",sep=""), cex = 0.65)  abline(0, 1, lty = 2)  cat(titl, "\n")  if(device!="")dev.off()  invisible(u) }ў§џ ўџџџџ ўџџ@ џ@џџxџ@ ўў џjџ 9Brain Weight as a Function of Litter Size and Body Weightў џ џ џ:џџ@@ў џџ@ffffff@ffffff@ЬЬЬЬЬЭ@ЬЬЬЬЬЭўџџ@?рў.џ ўўџ џ џўўџџЯџћ?№ўџЯџћ@ўXџ Litter SizeYџ Brain Weight (g)"џ@0ў џџ=џџ brainwt lsizeў!џЯџўўvџ  ў}џџХџџўУџўўvџ  ў џ seџџХџџўУџў@@ўўEџFџ@Gџ?а'џ)џ brainwt =—џџџџУџў?№ў@ў +—џџџџУџў@ў@ў [SE =—џжџ@ў ] lsizeў+џ?фЬЬЬЬЬЭўџџЯџћ@ўџЯџћ@ўXџ Body Weight (g)Yџ Brain Weight (g)"џ@0ў џƒџ=џџдџ bodywtў!џЯџўў}џџХџƒџўУџўўvџ  ўEџFџ@Gџ?а'џ)џ brainwt =—џџџƒџУџў?№ў@ў +—џџџƒџУџў@ў@ў bodywtў+џ?фЬЬЬЬЬЭўџџЯџћ?№ўџЯџћ@ўXџ Litter SizeYџ Body Weight (g)"џ@0 mkh?ЄzсGЎ{ў џ r3mџџЯџћ?№ўџЯџћ@ўўўEџFџ@Gџ?а'џ)џ Correlation =—џйџ@ўў+џ?фЬЬЬЬЬЭў џ u=џџдџџеџзџўў!џЯџўў}џџХџкџўУџўў џTџUџкџўўџTџџЯџћ@ўXџ Fitted Weight (g)Yџ Brain Weight (g)"џ?№%џ@ў џжџџџХџкџўУџў@@ўў џ se1џџХџкџўУџў@@ўўEџFџ@Gџ?р'џ)џ brainwt =—џџџкџУџў?№ў@ў +—џџџкџУџў@ў@ў [SE =—џжџ@ў ]  lsize +—џџџкџУџў@ў@ў [SE =—џлџ@ў ]  bodywtkџ ў+џ?фЬЬЬЬЬЭўZџ?№Цџ@ўvџjџ  ўџџџ ў8џўўOџкџўў g6.5џ function(device="", col=1){ @ if(device!="")hardcopy(width=5.5, height=1.4, device=device) 7 oldpar <- par(mfrow=c(1,4), mar=c(4.1,4.1,2.1,0.6), : mgp=c(2.0,.5,0),oma=c(0,0,0,1), pty="s")  on.exit(par(oldpar)) 5 litters.lm<-lm(brainwt~bodywt+lsize,data=litters)  plot(litters.lm,caption= " c("A: Resids vs Fitted", 1 "B: Normal Q-Q", "C: Scale-Location", * "D: Cook's distance"), col=col) A figtxt<-paste("Diagnostic plots for the regression of brain", A " weight \non body weight and litter size",".",  sep="")  cat(figtxt, "\n")  if(device!="")dev.off()  invisible()  }ў§џ [џ?№ўџџџџ ўџџ@ џ?іffffffџџўў џ џ џ:џџ?№@ў џџ@ffffff@ffffff@ЬЬЬЬЬЭ?у333333ўџџ@?рў;џџ?№ўџ sўўџ џ џўў џ litters.lm=џџдџџзџеџўў!џЯџўўџнџKџџ A: Resids vs Fitted B: Normal Q-Q C: Scale-Location D: Cook's distanceў[џ[џў џ|џ)џ ,Diagnostic plots for the regression of brain ' weight on body weight and litter size .kџ ўўvџ|џ  ўџџџ ў8џўўOџўў g6.6џ !function(df = litters, device="") { J if(device!="")hardcopy(width=4, height=2.15, device=device, pointsize=8) 3 titl <- paste("termplots from the Regression of", L "\nof Brain Weight on Litter Size & Body Weight.", sep = "") = oldpar <- par(mfrow = c(1, 2), mar = c(4.6, 4.1, 2.1, 2.1), / mgp = c(2.5, 0.75, 0), pty="s")  par(mex = 1, cex = 1)  on.exit(par(oldpar)) * u <- lm(brainwt ~ lsize+bodywt, data=df) H termplot(u, partial.resid=TRUE, smooth=panel.smooth, col.res="gray30")  cat(titl,"\n")  if(device!="")dev.off() invisible() }ў§ dfЯџџ ўџџџџ ўџџ@ џ@333333џџxџ@ ўў џjџ)џ termplots from the Regression of . of Brain Weight on Litter Size & Body Weight.kџ ўў џ џ џ:џџ?№@ў џџ@ffffff@ffffff@ЬЬЬЬЬЭ@ЬЬЬЬЬЭўџџ@?шўџ sўў џ mex?№+џ?№ўџ џ џўў џкџ=џџдџџеџзџўў!џпџўў termplotкџ partial.resid ЬџЮџ col.res gray30ўvџjџ  ўџџџ ў8џўўOџўў g6.7џ function(device="") { @ if(device!="")hardcopy(width=2.25, height=2.25, device=device) A oldpar<-par(mar=c(4.1,4.1,2.1,1.1), mgp=c(2.5,0.75,0), pty="s")  on.exit(par(oldpar)) * plot(mice12.lm, which=5, sub.caption="")  if(device!="")dev.off() }ў§џ ўџџџџ ўџџ@ џ@џџўў џ џ џ џџ@ffffff@ffffff@ЬЬЬЬЬЭ?ё™™™™™šўџџ@?шўџ sўўџ џ џўўџ mice12.lmЪџ@ sub.caption ўџџџ ў8џўўў g6.8џ function(device="") { ? if(device!="")hardcopy(width=4.25, height=1.5, device=device) @ oldpar<-par(mar=c(5.1,3.6,2.1,1.1), mgp=c(2.25,0.75,0), las=1)  on.exit(par(oldpar)) < allbacks.lm0 <- lm(weight ~ -1+volume+area, data=allbacks)  z <- dfbetas(allbacks.lm0) O plot(range(z), c(0.25,1), xlab="Standardized change in coefficient", ylab="",  axes=F, type="n")  chh <- par()$cxy[2] par(xpd=T) axis(1)  abline(h=par()$usr[3])  m <- dim(z)[1] $ points(z[,1], rep(0.5,m), pch="|") " points(z[,2], rep(1,m), pch="|") 6 idrows <- (1:m)[apply(z,1,function(x)any(abs(x)>2))] R if(length(idrows)>0)text(z[idrows,],rep(c(.5,1)-0.25*chh,rep(length(idrows),2)), A rep(paste(idrows), 2), pos=1, cex=0.8)  par(family="mono") @ text(rep(par()$usr[1],2), c(.5,1), c("volume", "area"), pos=2) $ title(sub="dfbetas(allbacks.lm0)")  par(family="sans")  if(device!="")dev.off()  }ў§$џ ўџџџџ ўџџ@ џ?јџџўў џ џ џ џџ@ffffff@ ЬЬЬЬЬЭ@ЬЬЬЬЬЭ?ё™™™™™šўџџ@?шў las?№ўўџ џ џўў џ allbacks.lm0=џџ џџџџ?№ўџў†џўў!џџўў џОџ dfbetasщџўўџџОџўџ?а?№ўXџ "Standardized change in coefficientYџ  axes`џnџ nў џuџџџ џў cxyў@ўў џ.џ3џў axis?№ўZџ hџџ џў usrў@ўў џ mџЗџОџў?№ўўrџџОџћ?№ў_џ?рюџў"џ |ўrџџОџћ@ў_џ?№юџў"џ |ў џ idrowsџЈџ*џ?№юџўўœџОџ?№Іџ0џћў any > abs0џў@ўў function(x)any(abs(x)>2)ўўўўџёџ­џяџўў'џџОџяџћў_џџџ?р?№ўџ?аuџўў_џ­џяџў@ўў_џ)џяџў@ў-џ?№+џ?щ™™™™™šўў џ family monoў'џ_џџџ џў usrў?№ў@ўџ?р?№ўџ volume areaў-џ@ў titleJџ dfbetas(allbacks.lm0)ў џѓџ sansўџџџ ў8џўўў g6.9џ function(device=""){ 1 if(device!="")hardcopy(width=5.2, height=3.1, I device=device, pointsize=c(6,4), trellis=TRUE) ; oldpar <- par(fig=c(0,0.5,0,1), mar=c(0.5,0.5,2.6,0.5))  on.exit(par(oldpar))  plot.new() G mtext(side=3, line=1.5, "A: Untransformed scales:", adj=0, cex=0.9) 7 par(fig=c(0.5,1,0,1), mar=c(0.5,0.5,2.6,0.5),new=T) H mtext(side=3, line=1.5, "B: Logarithmic scales", adj=0, cex=0.9) 0 hills.splom <- splom(~hills, cex.labels=1.2, 5 varnames=c("dist\n(miles)","climb\n(feet)", 9 "time\n(hours)"), newpage=FALSE, xlab="") ? print(hills.splom, position=c(0, 0, 0.5, 1), newpage=FALSE) 6 lhills.splom <- splom(~log(hills), cex.labels=1.2, ) varnames=c("dist\n(log miles)", B "climb\n(log feet)", "time\n(log hours)"), xlab="") @ print(lhills.splom, position=c(0.5, 0, 1, 1), newpage=FALSE)  if(device!="")dev.off()  invisible()  }ў§$џ ўџџџџ ўџџ@ЬЬЬЬЬЭ џ@ЬЬЬЬЬЭџџxџџ@@ў trellis ўў џ џ џ figџ?р?№ў џџ?р?р@ЬЬЬЬЬЭ?рўўўџ џ џўўCџўEџFџ@Gџ?ј A: Untransformed scales:Hџ+џ?ьЬЬЬЬЬЭў џїџџ?р?№?№ў џџ?р?р@ЬЬЬЬЬЭ?рўIџ3џўEџFџ@Gџ?ј B: Logarithmic scalesHџ+џ?ьЬЬЬЬЬЭў џ hills.splom splomџBџўаџ?ѓ333333 varnamesџ dist (miles) climb (feet) time (hours)ў newpage Xџ ўў}џјџ positionџ?р?№ўћџ ў џ lhills.splomљџџ>џBџўўаџ?ѓ333333њџџ dist (log miles) climb (log feet) time (log hours)ўXџ ўў}џ§џќџџ?р?№?№ўћџ ўџџџ ў8џўўOџўў gdumpџ 7function(fnam=NULL, prefix="~/r-book/ed2/figures/figs", K xtras=c("hardcopy","renum.fun","renum.files"), splitchar="/ch"){  if(is.null(fnam)){  path <- getwd() 7 pathtag <- strsplit(path, "/ch", fixed=TRUE)[[1]] 5 fnam <- paste(prefix, pathtag[length(pathtag)], ! ".R", sep="")  } - else fnam <- paste(prefix, fnam, sep="/") C objnames <- c(objects(pattern="^g", envir=sys.frame(0)), xtras) & cat("\nDump to file:", fnam, "\n")  print(objnames)  dump(objnames, fnam)  }ў§ fnamў prefix ~/r-book/ed2/figures/figs xtrasџ hardcopy renum.fun renum.filesў splitchar /chўџџ is.nullџџўџ џ path getwdўў џ pathtag [[ strsplitџ /ch fixed ў?№ўў џџџ)џџџџ­џџўў .Rkџ ўўў џџџ)џџџџkџ /ўўў џ objnamesџ objects pattern ^g envir sys.frameўўџўўvџ  Dump to file:џџ  ў}џ џў dump џџџўў gfocus.demoџ$ function(device=""){  library(lattice)  library(grid) Q if(device!="")hardcopy(device=device, width=4, height=2.25, trellis=TRUE, ' color=TRUE) H trellis.par.set(layout.heights=list(key.top=0.25, axis.top=0.5)) H hp1.plt1 <- xyplot(o2 ~ wattsPerKg, groups=id, data=humanpower1, 9 panel=function(x,y,subscripts,groups,...){ ' u <- lm(y~groups*x); # hat <- fitted(u) 9 panel.superpose(x,y,subscripts,groups) E panel.superpose(x,hat,subscripts,groups, type="l")  }, F## key=simpleKey(text=rep("",5), lines=TRUE, columns=5), ) xlab="Watts per kilogram", K ylab=expression("Oxygen intake ("*ml.min^{-1}*.kg^{-1}*")"), N legend=list(top=list(fun=textGrob, args=list(label="A", x=0)))) / print(hp1.plt1, position=c(0,0,.535,1)) J u <- lme(o2 ~ wattsPerKg, random=~wattsPerKg|id, data=humanpower1) H hp1.plt2 <- xyplot(o2 ~ wattsPerKg, groups=id, data=humanpower1, 9 panel=function(x,y,subscripts,groups,...){ ' u <- lm(y~groups*x); # hat <- fitted(u) E panel.superpose(x,hat,subscripts,groups, type="l")  }, 2 xlab="Watts per kilogram", ylab="", N legend=list(top=list(fun=textGrob, args=list(label="B", x=0))))  hat <- fitted(u) ? print(hp1.plt2, position=c(.465, 0,1,1), newpage=FALSE) / trellis.focus("panel", row=1, column=1) & arglist <- trellis.panelArgs() H panel.superpose(x=arglist$x,y=hat,subscripts=arglist$subscripts, A groups=arglist$groups, , type="l", lty=2) ! trellis.unfocus()  if(device!="")dev.off()  }ў§џ ўџ library latticeўџ gridўџџџ ўџџџџ@ џ@іџ  color ўў trellis.par.set layout.heightsПџ key.top?а axis.top?рўў џ hp1.plt1 xyplotџ o2 wattsPerKgў groups id!џ humanpower1 panelІџ0џћ1џћ subscriptsћџћ ...ћўџ џкџ=џџ1џџџ0џўўўў џTџUџкџўў panel.superpose0џ1џ!џџў#џ0џTџ!џџnџ lўў $function(x,y,subscripts,groups,...){ ' u <- lm(y~groups*x); # hat <- fitted(u) 9 panel.superpose(x,y,subscripts,groups) E panel.superpose(x,hat,subscripts,groups, type="l")  }ўXџ Watts per kilogramYџ expressionџџџ Oxygen intake ( ^ ml.minџџ?№ўўўў%џ .kgџџ?№ўўўў )ўў/џПџ topПџ fun textGrob argsПџ label A0џўўўўў}џџќџџ?сИQы…?№ўў џкџ lmeџџџў randomџ |џџўў!џџўў џ hp1.plt2џџџџўџџ!џџ џІџ0џћ1џћ!џћџћ"џћўџ џкџ=џџ1џџџ0џўўўў џTџUџкџўў#џ0џTџ!џџnџ lўў $function(x,y,subscripts,groups,...){ ' u <- lm(y~groups*x); # hat <- fitted(u) E panel.superpose(x,hat,subscripts,groups, type="l")  }ўXџ Watts per kilogramYџ /џПџ(џПџ)џ*џ+џПџ,џ B0џўўўўў џTџUџкџўў}џ0џќџџ?нТ\(ѕУ?№?№ўћџ ў trellis.focus panel row?№ column?№ў џ arglist trellis.panelArgsўў#џ0џџ4џ0џў1џTџ!џџ4џ!џўџџ4џџўћnџ lЦџ@ў trellis.unfocusўџџџ ў8џўўў gsaveџ 7function(fnam=NULL, prefix="~/r-book/ed2/figures/figs", K splitchar="/ch", xtras=c("renum.fun","renum.files","hardcopy")){  if(is.null(fnam)){  path <- getwd() 7 pathtag <- strsplit(path, "/ch", fixed=TRUE)[[1]] 5 fnam <- paste(prefix, pathtag[length(pathtag)], % ".RData", sep="")  } - else fnam <- paste(prefix, fnam, sep="/") C objnames <- c(objects(pattern="^g", envir=sys.frame(0)), xtras) & cat("\nDump to file:", fnam, "\n")  print(objnames) " save(list=objnames, file=fnam)  }ў§џџўџ ~/r-book/ed2/figures/figsџ /chџџ renum.fun renum.files hardcopyўўџџџџџўџ џџџўў џџџџџ /ch џ ў?№ўў џџџ)џџџџ­џџўў .RDatakџ ўўў џџџ)џџџџkџ /ўўў џ џџ џ џ ^g џџўўџўўvџ  Dump to file:џџ  ў}џ џў saveПџ џ fileџџўў gtestџ function(){ / trellis.device(postscript, file="test.eps") 5 trellis.par.set(layout.heights=list(key.top=0.5)) 6 zz.d <- dotplot(variety ~ yield, data = barley, B legend=list(top=list(fun=grid.text, I args=list(label="ABC", x=0)))) 4 pushViewport(viewport(layout=grid.layout(2, 1))) , pushViewport(viewport(layout.pos.row=1))  print(zz.d,newpage=FALSE)  upViewport() , pushViewport(viewport(layout.pos.row=2))  print(zz.d, newpage=FALSE)  popViewport(2) dev.off()  }ў§ўџ trellis.device postscript9џ test.epsўџџПџџ?рўў џ zz.d dotplotџ variety yieldў!џ barley/џПџ(џПџ)џ grid.text+џПџ,џ ABC0џўўўўў pushViewport viewport layout grid.layout@?№ўўўCџDџ layout.pos.row?№ўў}џ=џћџ ў upViewportўCџDџGџ@ўў}џ=џћџ ў popViewport@ў8џўў renum.funџ Dfunction(from.prefix="g", to.prefix="g",from=20:7, to=21:8, doit=F){  path <- getwd() 5 pathtag <- strsplit(path, "/ch", fixed=TRUE)[[1]] & endbit <- pathtag[length(pathtag)] 5 from.prefix <- paste(from.prefix, endbit, sep="") 1 to.prefix <- paste(to.prefix, endbit, sep="")  for(i in 1:length(to)) M {txt<-paste(to.prefix,".",to[i]," <- ", from.prefix,".",from[i],sep="") 7 if(doit)eval(parse(text=txt),envir=sys.frame(0))  print(txt)  }  }ў§ from.prefix g to.prefix g from*џ@4@ў to*џ@5@ ў$ doit`џўџ џџџўў џџџџџ /ch џ ў?№ўў џ endbitџџ­џџўўў џKџ)џKџPџkџ ўў џLџ)џLџPџkџ ўўБџВџ*џ?№­џNџўўџ џ txt)џLџ .џNџВџў  <- Kџ .џMџВџўkџ ўўџOџ eval parse'џQџў џџўўў}џQџўўўў renum.filesџ Hfunction(from.prefix="~/r-book/ed2/Art/", to.prefix="~/r-book/ed2/Art/", ' from=20:7, to=21:8, doit=F){  path <- getwd() 5 pathtag <- strsplit(path, "/ch", fixed=TRUE)[[1]] & endbit <- pathtag[length(pathtag)] 2 if(nchar(endbit)==2)chap <- paste(endbit) else ' chap <- paste("0",endbit,sep="") 8 from.prefix <- paste(from.prefix, chap, "-", sep="") 4 to.prefix <- paste(to.prefix, chap, "-", sep="")  for(i in 1:length(from)){ 8 if (from[i]<=9) ltext <- paste("0",from[i],sep="") " else ltext <- paste(from[i]) 4 if (to[i]<=9) rtext <- paste("0",to[i],sep="") , else rtext <- paste(to[i]) 8 txt<-paste("mv ", from.prefix, ltext, ".eps", " ", 2 to.prefix, rtext, ".eps", sep="") ; backup<-paste("cp ", from.prefix, ltext, ".eps", " ", # "archive", sep="")  if(doit)system(backup)  if(doit)system(txt)  print(backup)  print(txt)  }  }ў§Kџ ~/r-book/ed2/Art/Lџ ~/r-book/ed2/Art/$Mџ*џ@4@ў$Nџ*џ@5@ ў$Oџ`џўџ џџџўў џџџџџ /ch џ ў?№ўў џPџџџ­џџўўўџ‘џ ncharPџў@ў џ chap)џPџўў џVџ)џ 0Pџkџ ўўў џKџ)џKџVџ -kџ ўў џLџ)џLџVџ -kџ ўўБџВџ*џ?№­џMџўўџџ <=џMџВџў@"ў џ ltext)џ 0џMџВџўkџ ўў џXџ)џџMџВџўўўўџWџџNџВџў@"ў џ rtext)џ 0џNџВџўkџ ўў џYџ)џџNџВџўўўў џQџ)џ mv KџXџ .eps  LџYџ .epskџ ўў џ backup)џ cp KџXџ .eps   archivekџ ўўџOџ systemZџўўџOџ[џQџўў}џZџў}џQџўўўўџџ4 =function(width=3.75, height=3.75, color=FALSE, trellis=FALSE, < device=c("","pdf","ps"), path=getwd(), file=NULL, D format=c("nn-nn", "name"), split="\\.", pointsize=c(8,4),  fonts=NULL,  horiz=FALSE, ...){ ) if(!trellis)pointsize <- pointsize[1]  funtxt <- sys.call(1) B nam <- strsplit(as.character(funtxt), "(", fixed=TRUE)[[1]][1] 3 suffix <- switch(device, ps=".eps", pdf=".pdf") N if(is.character(path) & nchar(path)>1 & substring(path, nchar(path))!="/") & path <- paste(path, "/", sep="") - if(is.null(file)) if(format[1]=="nn-nn"){ C if(!is.null(split))dotsplit <- strsplit(nam, split)[[1]] else  dotsplit <- nam 8 if(length(dotsplit)==1)dotsplit <- c("", dotsplit) E nn2 <- paste(if(nchar(dotsplit[2])==1)"0" else "", dotsplit[2],  sep="")  if(nchar(dotsplit[1])>0){ O numstart <- which(unlist(strsplit(dotsplit[1], "")) %in% paste(0:9))[1] / nn1 <- substring(dotsplit[1], numstart) G nn1 <- paste(if(nchar(nn1) == 1) "0" else "", nn1, "-", sep="")  } else nn1 <- "" % file <- paste(nn1, nn2, sep="")  } else file <- nam L if(nchar(file)>4 & substring(file, nchar(file)-nchar(suffix)+1)==suffix)  suffix <- "" - file <- paste(path, file, suffix, sep="") : print(paste("Output will be directed to file:", file))  dev.out <- device[1] 6 dev.fun <- switch(dev.out, pdf=pdf, ps=postscript)  if(trellis){  library(lattice)  if(device=="ps") 1 trellis.device(file=file, device=dev.fun, ? color = color, horiz=horiz, fonts=fonts, < width=width, height=height, ...) else < trellis.device(file=file, device=dev.fun, fonts=fonts, D color = color, width=width, height=height, ...) R trellis.par.set(list(fontsize=list(text=pointsize[1], points=pointsize[2]))) } else  if (dev.out!=""){  print(c(width, height))  if(device=="ps") F dev.fun(file=file, paper="special", horiz=horiz, fonts=fonts, M width=width, height=height, pointsize=pointsize[1], ...) else 6 dev.fun(file=file, paper="special", fonts=fonts, L width=width, height=height, pointsize=pointsize[1], ...)  } D if(trellis)trellis.par.set(list(fontsize=list(text=pointsize[1], < points=pointsize[2])))  }ў§џ@ џ@џ іџ џџ  pdf psўџџў9џў formatџ nn-nn nameў split \.xџџ@ @ў fontsў2џ "џћў srcref  ) srcfileђ encoding native.enc timestampAбрТŽ class POSIXt POSIXctў filename /tmp/johnm.hardcopy.R wd /Users/johnm/r/ch6ўўdџ srcfileўdџ srcrefў `џaџdџ srcrefў   B`џaџdџ srcrefў   3`џaџdџ srcrefў   &`џaџdџ srcrefў  `џaџdџ srcrefў `џaџdџ srcrefў -`џaџdџ srcrefў :`џaџdџ srcrefў `џaџdџ srcrefў 6`џaџdџ srcrefў  2`џaџdџ srcrefў 34<`џaџdџ srcrefў`џaџўџџ‹џіџў џxџџxџ?№ўўў џ funtxt sys.call?№ўў џ namџџџ as.charactergџў ( џ ў?№ў?№ўў џ suffix switchџ ps .eps pdf .pdfўўџ &oџ is.characterџўёџUџџў?№ўўџ substringџUџџўў /ўў џџ)џџ /kџ ўўўџџ9џўџ‘џџ\џ?№ў nn-nnў_џ `џaџdџ srcrefў 8`џaџdџ srcrefў `џaџdџ srcrefў `џaџdџ srcrefў %`џaџdџ srcrefў`џaџўџџ‹џџ]џўў џ dotsplitџџiџ]џў?№ўў џrџiџўўџ‘џ­џrџў?№ў џrџџ rџўўў џ nn2)џџ‘џUџџrџ@ўў?№ў 0 ўџrџ@ўkџ ўўџёџUџџrџ?№ўўў_џ  O`џaџdџ srcrefў  /`џaџdџ srcrefў  G`џaџdџ srcrefў`џaџўџ џ numstartџЪџ %in% unlistџџrџ?№ў ўў)џ*џ@"ўўўў?№ўў џ nn1qџџrџ?№ўtџўў џwџ)џџ‘џUџwџў?№ў 0 ўwџ -kџ ўўў џwџ ўў џ9џ)џwџsџkџ ўўў џ9џiџўўўџoџёџUџ9џў@ў‘џqџ9џџџUџ9џўUџkџўў?№ўўkџўў џkџ ўў џ9џ)џџ9џkџkџ ўў}џ)џ Output will be directed to file:9џўў џ dev.outџџ?№ўў џ dev.funlџxџnџnџmџ<џўўџіџ_џ !!`џaџdџ srcrefў "'D`џaџdџ srcrefў ))R`џaџdџ srcrefў`џaџўџџџўџ‘џџ psў;џ9џ9џџyџџџ2џ2џ^џ^џџџ џ џ"џў;џ9џ9џџyџ^џ^џџџџџ џ џ"џўўџПџ fontsizeПџ'џџxџ?№ўrџџxџ@ўўўўўџџxџ ў_џ ,,`џaџdџ srcrefў -1F`џaџdџ srcrefў`џaџўџ}џџџ џўўџ‘џџ psўyџ9џ9џ paper special2џ2џ^џ^џџџ џ џxџџxџ?№ў"џўyџ9џ9џ{џ special^џ^џџџ џ џxџџxџ?№ў"џўўўўўџіџџПџzџПџ'џџxџ?№ўrџџxџ@ўўўўўўў