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?

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

______________________________________________
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