# Example AIC , SBC ###################################### n <- 100 # choose values for n e.g. 10, 100 s2f <- function(x) { 24/x^6} kf <- function(x) { x } aicf <- function(x) { log(s2f(x))/n + 2*kf(x)/n } sbcf <- function(x) { log(s2f(x))/n + log(n)*kf(x)/n } par(mfrow=c(2,2)) curve(kf, from=0,to=n) curve(log(s2f(x)), 0,n) curve(aicf, 0,10) curve(sbcf, 0,10)