Description Usage Arguments Value Author(s)
This function is used to calculate an LNOCV score for a given model, based on mean squared error, out of sample. Same as mmsscore but with no error checking.
1 | mmsscore_int(mats, pred, n, maxruns)
|
mats |
A list of matrices, all assumed to be the same dimensions. Only the lower triangles are used. NA/NaNs are allowed. The first entry taken to be the response. |
pred |
The indices in mats of predictor variables in the more complex of the two models to be compared, should not include 1. Input is numeric value(s), e.g. pred=2, pred =2:3, pred =c(2,3,5). |
n |
The number of sampling locations to leave out, must be at least 2. |
maxruns |
The maximum number of leave-n-outs (LNOs) to do. To be used if choose(dim(mats[[1]]),n) is very large. Inf to use (or try to use) all LNOs. If maxruns is a number, then LNOs are selected randomly and hence may include repeats. |
mmsscore
return an object of class list consisting of
lno.score |
The out-of-sample forecast accuracy (mean squared error) |
num.pos |
The possible number of LNOs for the given n and number of locations |
num.att |
The total number of LNOs attempted |
num.rnk |
The number of LNOs that did not result in a rank deficiency regression problem, and so could be used for testing out-of-sample predictions |
num.usd |
The number of LNOs that could be used in the end (possibly less than num.rnk because of NAs in the input matrices) |
Tom Anderson, anderstl@gmail.edu; Daniel Reuman, reuman@ku.edu; Jon Walter, jaw3es@virginia.edu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.