HW 4 - panel = function(x,y panel.xyplot(x,y...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 library(lattice) load("C:\\lattice.RData") attach(keytime) kt14 <- keytime[keytime$subject==14,] kt14 <- keytime[keytime$subject==14,-1] dim(kt14) detach(keytime) attach(kt14) tapply(delay, list(session,run),sum) array<-tapply(delay, list(session,run),sum) dim(array) m<-matrix(tapply(delay,list(run,label,session), sum),400 , 21) m<-as.vector(t(m)) min(m) max(m) m<-m+0.1627 m sum(m) r<-m/sum(m) r fdelay<-r ldelay<-log(r) i <- 6 for(i in levels(label)) print(i) trellis.device(pdf, file="C:\\Users\\phuppo\\Desktop\\HW4.pdf") bwplot(fdelay~label, data=kt14, aspect=1, scales = "free", sub = list("Box Plot",cex=.8), xlab="Delay") xyplot(ldelay~run|session*label, data = kt14, prepanel=function(x,y) prepanel.loess(x,y, degree = 1, family = "s", span = 3, evaluation = 50),
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: panel = function(x,y){ panel.xyplot(x,y) panel.loess(x,y, degree = 1, family = "s", span = 3, evaluation = 50) }, layout = c(4,2), scales = "same", pch = ".", cex = .2, sub = list("XY PLOT WITH LOESS FITTING",cex=.8), aspect = 1.0) qqmath(~ ldelay | session, Sheet1 Page 2 data=kt14, prepanel = prepanel.qqmathline, panel = function(x, . ..) { panel.grid() panel.qqmathline(x, distribution = qnorm) panel.qqmath(x, . ..) }, scales = "same", layout = c(2,2), pch=".", cex=2, sub = list("Normal QQ Plot",cex=.8), xlab = "Unit Normal Quantile", ylab="log fdelay") graphics.off() bwplot(inv~label, data=kt14, aspect=1, sub = list("Box Plot",cex=.8), xlab="Delay")...
View Full Document

This note was uploaded on 07/10/2011 for the course STAT 695 taught by Professor Staff during the Spring '08 term at Purdue.

Page1 / 2

HW 4 - panel = function(x,y panel.xyplot(x,y...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online