Comments

You are not authorized to post a comment

Comment

Administrator
Avatar
Please try the following R script and let me know if it works:

Code R :
 
x <- 1:100
y <- x^2 + 2*x
 
plot(x, y, log = "xy")
 
model = lm(log(y) ~ log(x))
lines(x, exp(predict(model, newdata=list(x=x))) ,col = "red")
 


Best,
A>

Comment

Member
Avatar
Does anyone know how to fit a linear regression to a graph with log transformed axes? using the untf function hasn't worked for me.