gausspred {PredictiveRegression} | R Documentation |
Prediction intervals based on the Gauss linear model
gausspred(train,test,epsilons=c(0.05,0.01))
train |
Training set as a matrix of size N times K+1. Each row describes an observation. Columns 1 to K are the explanatory variables, and column K+1 is the response variables. |
test |
Test set as a matrix of size N2 times K. Each row corresponds to an observation (but without the response variable). Columns 1 to K are the explanatory variables. |
epsilons |
Vector of several significance levels.
Each significance level epsilons [j] is a number between 0 and 1.
The default value is (5%,1%). |
The output is a list of three elements.
output[[1]] |
The matrix of lower bounds of prediction intervals.
Its size is N2 times Neps,
where N2 is the number of test observations
and Neps is the number of significance levels.
The element output[[1]] [i,j] of output[[1]]
is the lower bound a of the prediction interval [a,b]
for the i-th test observation
and for the j-th significance level epsilons [j]
in the vector epsilons . |
output[[2]] |
The matrix of upper bounds b,
with the same structure as output[[1]] .
Typically a = output[[1]] [i,j]
and b = output[[2]] [i,j] are real numbers
such that a <= b.
Exceptions: a is allowed to be -infinity
and b is allowed to be infinity;
the only case where a > b
is a = infinity and b = - infinity
(the empty prediction [a,b]). |
output[[3]] |
The termination code: 0 = normal termination; 1 = illegal parameters (the training and test sets have different numbers of explanatory variables); 2 = too few observations. |
Vovk, V., Nouretdinov, I., and Gammerman, A. (2008) On-line predictive linear regression. Annals of Statistics (to appear). This paper describes this standard textbook procedure and its properties when used in the on-line mode.
train <- matrix(c(1,2,3,4, 2.01,2.99,4.01,4.99), nrow=4, ncol=2); test <- matrix(c(0,10,20), nrow=3, ncol=1); output <- gausspred(train,test,c(0.05,0.2)); print(output[[1]]); print(output[[2]]);