bootMSE | R Documentation |
Using a linear model produced by sisal
, computes a
bootstrap estimate of MSE in test data.
bootMSE(object, dataset = NULL, R = 1000,
inputs = c("L.f", "L.v", "full"),
method = c("OLS", "magic"), standardize = "inherit",
stepsAhead = NULL, noiseSd = NULL, verbose = 1, ...)
object |
an object of class |
dataset |
dataset to work on. A |
R |
the number of bootstrap replicates. Usually a single
positive integral number. See |
inputs |
a |
method |
a |
standardize |
|
stepsAhead |
If doing time series prediction, this indicates how
many steps ahead to predict. A non-negative integral value or
|
noiseSd |
standard deviation of the noise to be added to the
dependent variable when |
verbose |
verbosity level. A single |
... |
arguments passed to |
Four types of values are supported in dataset
.
Use one of "laser"
, "poland"
, "toy"
and
"tsToy"
to work on the test part of a dataset included in or
specifically supported by the package. The first two options will
load their respective datasets over a network connection. See
sisalData
, toy.test
and
tsToy.test
.
Use a numeric
vector
to work with time series
data. The use of the "laser"
and "poland"
datasets is
recognized. Loading the datasets in advance reduces unnecessary
network traffic when doing multiple repeats with the same dataset.
Use a list
with a numeric
matrix
"X"
and a numeric
vector
"y"
to supply
inputs "X"
and output "y"
. This is appropriate when
using your own data for something else than time series prediction
based on past values of the same time series.
Use NULL
(the default value) for automatic detection of
the dataset. This works if object
was created with
testSisal
.
When using time series data, the names of the inputs used in
object
must match the regular expression
"lag\.\d+"
, i.e. "lag"
followed by a dot and an
integer without spaces or any other formatting. This is automatically
taken care of by laggedData
and testSisal
.
When using other than time series data, the user-supplied
dataset
must contain all the input variables used in the
selected linear model (i.e. full model or a subset of inputs) of
object
.
An object of class "boot"
, as returned by
boot::boot
.
Mikko Korpela
boot::boot
, sisal
,
testSisal
foo <- testSisal(dataset="toy", Mtimes=10)
bootMSE(foo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.