Thanks
Carla
P.S. please excuse the clumsy code!
#Section 2 Data Set particle
dial<-rbind(-1,
-1,
0,
0,
0,
0,
1,
1,
1)
counts<-rbind(2,
3,
6,
7,
8,
9,
10,
12,
15)
particle<-as.data.frame(cbind(dial,counts),row.names=NULL)
names(particle)<-c("dial","counts")
attach(particle)pois.particle<-glm(counts~dial,family=poisson) x<-seq(-2,2,length=20) y<-predict(pois.particle,data.frame(dial=x),type="response")
#Overlaying plots
x11()
boxplot(counts~dial,main="Boxplot of counts for dial setting and poisson fit",ylim=c(0,25))
lines(x,y)
#The seperate plots x11() boxplot(counts~dial,ylim=c(0,25)) x11() plot(x,y,ylim=c(0,25),type="l")
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
