powered by
Computes the accurate criterion of smoothed (fitted) values.
accurate(x, x.hat, k, output = TRUE)
A vector containing the following components:
the total sum of squares.
the sum of the squared residuals.
the mean squared error.
the root mean square error.
the mean absolute percent error.
the mean percent error.
the mean absolute error.
the mean error.
R^2 = 1 - SSE/SST.
the adjusted R^2.
the random walk R^2.
the Akaike's information criterion.
the Schwarz's Bayesian criterion.
the Amemiya's prediction criterion
a numeric vector of original values.
a numeric vector of smoothed (fitted) values.
the number of parameters in obtaining the smoothed (fitted) values.
a logical value indicating to print the results in R console. The default is TRUE.
TRUE
Debin Qiu
See http://www.dms.umontreal.ca/~duchesne/chap12.pdf in page 616 - 617 for the details of calculations for each criterion.
X <- matrix(rnorm(200),100,2) y <- 0.1*X[,1] + 2*X[,2] + rnorm(100) y.hat <- fitted(lm(y ~ X)) accurate(y,y.hat,2)
Run the code above in your browser using DataLab