Re: [R] glm and plot.effects

From: John Fox <jfox_at_mcmaster.ca>
Date: Fri 06 Oct 2006 - 12:37:33 GMT


Dear Michael,

Look more closely at the two plots: With rescale.axis=TRUE (the default), the vertical axis is on the scale of the linear predictor (i.e., the logit scale), but the tick marks are labelled in the scale of the response (i.e., the probability scale); this preserves the linear structure of the model. With rescale.axis=FALSE, the vertical axis is on the scale of the response (directly on the probability scale).

If you want the vertical axis labelled on the scale of the linear predictor, specify type="link" (the default is "response").

I hope this helps,
 John



John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Michael Kubovy
> Sent: Friday, October 06, 2006 7:19 AM
> To: R list
> Subject: [R] glm and plot.effects
>
> Dear R-helpers,
>
> I don't see a difference between the following two plots of
> effect objects, which I understand should be different. What
> am I missing?
>
> require(doBy)
> require(effects)
> data(budworm)
> m1 <- glm(ndead/20 ~ sex + log(dose), data=budworm, weight=ntotal,
> family=binomial)
> m1.eff <- all.effects(m1)
> plot(m1.eff, rescale.axis = FALSE, selection = 2, main =
> 'rescale = F') plot(m1.eff, rescale.axis = TRUE, selection =
> 2, main = 'rescale = T')
>
> *********************************
> R version 2.4.0 (2006-10-03)
> powerpc-apple-darwin8.7.0
>
> locale:
> C
>
> attached base packages:
> [1] "grid" "tools" "splines" "methods" "utils"
> [6] "stats" "graphics" "grDevices" "datasets" "base"
>
> other attached packages:
> effects doBy Hmisc chron weaver codetools
> "1.0-9" "0.8" "3.1-1" "2.3-8" "1.0.0" "0.0-3"
> digest proptest survival lme4 Matrix JGR
> "0.2.2" "0.1-1" "2.29" "0.9975-0" "0.9975-1" "1.4-11"
> iplots JavaGD rJava MASS lattice
> "1.0-4" "0.3-5" "0.4-10" "7.2-29" "0.14-9"
>
> _____________________________
> Professor Michael Kubovy
> University of Virginia
> Department of Psychology
> USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
> Parcels: Room 102 Gilmer Hall
> McCormick Road Charlottesville, VA 22903
> Office: B011 +1-434-982-4729
> Lab: B019 +1-434-982-4751
> Fax: +1-434-982-4766
> WWW: http://www.people.virginia.edu/~mk9y/
>
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.



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 and provide commented, minimal, self-contained, reproducible code. Received on Fri Oct 06 22:42:27 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 06 Oct 2006 - 13:30:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.