On Sat, May 18, 2013 at 7:05 AM, Stephen Milborrow wrote:
> Paul Johnson 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 fo
Paul Johnson 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(An
Paul,
Inverting log(y) is just the beginning of the problem, after that you need to
teach predict.lm() that E(y |x) = exp(x'betahat + .5*sigmahat^2) and then
further
lessons are required to get it to understand how to adapt its confidence and
prediction bands… and then you need to generalize
This is an R formula handling question. It arose in class. We were working
on the Animals data in the MASS package. In order to see a relationship,
you need to log brain and body weight. It's a fun one for teaching
regression, if you did not try it yet. There are outliers too!
Students wanted to
4 matches
Mail list logo