Description Usage Arguments Details Value
Linear regression model selection with an out-of-sample criterion for spatial extrapolation. Current version uses the minimum mean squared forecast error method. While leaps reports subsets for each number of regressors, this reports across all sizes. Randomly samples several sets of observations to be removed. Brute force algorithm without much regard for memory conservation. ***Future version should implement a parallel version of this.
1 2 |
xData |
a matrix of predictors |
yData |
a response vector |
nReps |
number of combinations of spatial units to be used in the estimation |
tau |
number of observations to remove from estimation and use in out-of-sample prediction. Default is ceiling(x/10). |
int |
Add an intercept to the model (default is TRUE) |
nbest |
number of regressions to report (default is 1) |
regressor |
names |
Thanks to Thomas Lumley for the similar leaps()
function that selects
with an in-sample criterion. His uses much more efficient algorithms. The
current implementation is only robust for nbest=1.
list of lm objects
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.