I want to minimize this function by using lm function in R, but Im not sure it is the right way to do it, can someone help me out?
I have tried out this code:
fx <- lm(log(St)~t+I(t^2))
fy <- lm(log(Nt)~t+I(t^2))
t <- 1:50
fx <- 0.32369+0.33647t-0.00531t^2