您好!
x <- c(0.02, 0.02, 0.06, 0.06, 0.11, 0.11, 0.22, 0.22, 0.56, 0.56,1.10, 1.10)
y <- c(76, 47, 97, 107, 123, 139, 159, 152, 191, 201, 207, 200)
fn <- function(p) sum((y - (p[1] * x)/(p[2] + x))^2)
plot(x, y)
xfit <- seq(.02, 1.1, .05)
yfit <- 200 * xfit/(0.1 + xfit)
lines(spline(xfit, yfit))
out <- nlm(fn, p = c(200, 0.1), hessian = TRUE)
sqrt(diag(2*out$minimum/(length(y) - 2) * solve(out$hessian)))
plot(x, y)
xfit <- seq(.02, 1.1, .05)
yfit <- 212.68384222 * xfit/(0.06412146 + xfit)
lines(spline(xfit, yfit))
以上是我要拟合的模型及其代码。
我不清楚AIC值要什么语句才能出来?
望指点