5
C'è un modo per utilizzare geom_smooth
quando la variabile y
nella formula viene trasformata? Per esempio:Utilizzare geom_smooth con trasformato y
#This works:
myplot <- qplot(speed, dist, data=cars)
(myplot + geom_smooth(method="lm", formula=y~log(x)))
#does not work
(myplot + geom_smooth(method="lm", formula=log(y)~x))
Quello che sto dopo è una linea come questa:
myplot + geom_line(aes(x=speed, y=exp(predict(lm(log(dist)~speed)))))