Closed hjwood closed 4 years ago
Hi Heather,
If you want a transformation function that doesn't exist, you'll have to define it yourself. For example:
library(visreg)
fit <- lm(sqrt(Ozone) ~ Wind + Temp, airquality)
f <- function(x) x^2
visreg(fit, 'Wind', trans=f)
# Or as a one-liner
visreg(fit, 'Wind', trans=function(x) x^2)
Hi,
I've been trying to backtransfrom my squareroot transformed data in visreg but I can't find the right command for trans=. In your guidance you only discuss using trans=exp to backtransform log transformed data. How do I specify I want to square the values using trans=.
Heather.