mmsrank_int: Rank models based on leave-n-out (LNO) score

Description Usage Arguments Value Author(s)

View source: R/mmsrank_int.R

Description

Function to rank models using a leave-n-out cross validation (LNOCV) procedure for matrix regression models. Same as mmsrank, but with no error checking.

Usage

1
mmsrank_int(mats, model.names, n, maxruns, rank.mod = F)

Arguments

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.

model.names

A list of models to run LNOCV on. NA input not accepted, in contrast to mmsrank. Specification needs to be as numeric values that correspond to mats elements. Examples of model specifications: 2, 2:3, 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 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.

rank.mod

Logical. If TRUE, sort models by rank. If FALSE (default), do not rank models.

Value

mmsrank Return a data frame with columns for

model.names

The name of the model, based on the indices of included predictors in mats

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)

Author(s)

Tom Anderson, anderstl@gmail.edu; Daniel Reuman, reuman@ku.edu; Jon Walter, jaw3es@virginia.edu


reumandc/mms documentation built on May 28, 2019, 5:39 p.m.