On Sat, May 18, 2013 at 7:05 AM, Stephen Milborrow <mi...@sonic.net> wrote:

> Paul Johnson <pauljoh...@gmail.com> wrote:
>>
>> m1 <- lm(log(y) ~ log(x), data = dat)
>>
>> termplot shows log(y) on the vertical.  What if I want y on the vertical?
>>
>
> plotmo in the plotmo package has an inverse.func argument,
> so something like the following might work for you?
>
> Thanks, I will read plotmo. I did not hear of that one before.

It looks like we have been working on same problem. Take at look at my
package "rockchalk" and run the examples for "plotSlopes" and
"plotCurves."  Exact same ideas you are thinking about.

I don't think it will help in this case because it still relies on the user
to know about  "exp" as the inverse of log. When users do predict on glm,
it "just knows" how to put predictions on the response or link scales, and
I am aiming for something automagical like that.




> library(MASS)
> library(plotmo)
> log.brain <- log(Animals$brain)
> log.body  <- log(Animals$body)
> m2 <- lm(log.brain ~ log.body)
>
> myplot <- function(...)
>    plotmo(m2, do.par=F, nrug=-1, col.resp=2, pch=20,        se=1, main="",
>  xlab="log(body)", ...)
>
> par(mfrow = c(2, 2))
> myplot(ylab="log(brain)")
> myplot(ylab="brain", inverse.func=exp)
> termplot(m2, se=T, rug=T) #  for comparison
>
>
> --
Paul E. Johnson
Professor, Political Science      Assoc. Director
1541 Lilac Lane, Room 504      Center for Research Methods
University of Kansas                 University of Kansas
http://pj.freefaculty.org               http://quant.ku.edu

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to