From: Martin Henry H. Stevens <HStevens_at_MUOhio.edu>

Date: Tue 30 Aug 2005 - 05:25:53 EST

plot(jitter(y/6) ~ x)

"E Pluribus Unum"

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Aug 30 05:36:53 2005

Date: Tue 30 Aug 2005 - 05:25:53 EST

Mac OS 10.3.9 R framework v. 2.1.1

fact <- gl(2,7) x <- rep(1:7,2) y <- c(1,1,2,3,2,3,4,1,2,1,2,3,3,4)

plot(jitter(y/6) ~ x)

# The following user defined function puts a curve (I believe the

correct one) into the scatterplot

panel.predglm <- function(x, y) {

model.trial <- glm(cbind(y,6-y) ~ poly(x,2), family=quasibinomial(link="logit"))

xfit <- seq(1,7, length=21) yfit <- predict(model.trial, newdata=data.frame(x=xfit), type="response") lines(xfit,yfit) }

panel.predglm(x, y)

# My attempt to use it in a lattice xyplot, however, fails. It draws a

curve which in most cases is outside the dimensions of the plot. I
suspect that the prediction is on the scale of the link functions.

library(lattice)

xyplot(y/6 ~ x|fact, ylim=c(0,.8),

panel=function(x, y,...) {

panel.xyplot(jitter(x),jitter(y)) panel.predglm(x,y) } )

Any thoughts?

Hank Stevens

Dr. Martin Henry H. Stevens, Assistant Professor
338 Pearson Hall

Botany Department

Miami University

Oxford, OH 45056

Office: (513) 529-4206

Lab: (513) 529-4262

**FAX: (513) 529-4243
**

http://www.cas.muohio.edu/botany/bot/henry.html http://www.muohio.edu/ecology/ http://www.muohio.edu/botany/

"E Pluribus Unum"

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Aug 30 05:36:53 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:39:58 EST
*