tsbootgce {GCEstim} | R Documentation |
Time series bootstrap Cross entropy estimation
Description
This generic function fits a linear regression model using bootstrapped time series via generalized cross entropy.
Usage
tsbootgce(
formula,
data,
subset,
na.action,
offset,
contrasts = NULL,
trim = 0.05,
reps = 1000,
start = NULL,
end = NULL,
coef.method = c("mode", "median"),
cv = TRUE,
cv.nfolds = 5,
errormeasure = c("RMSE", "MSE", "MAE", "MAPE", "sMAPE", "MASE"),
errormeasure.which = {
if (isTRUE(cv))
c("1se", "min", "elbow")
else c("min", "elbow")
},
support.method = c("standardized", "ridge"),
support.method.penalize.intercept = TRUE,
support.signal = NULL,
support.signal.vector = NULL,
support.signal.vector.min = 0.3,
support.signal.vector.max = 20,
support.signal.vector.n = 20,
support.signal.points = c(1/5, 1/5, 1/5, 1/5, 1/5),
support.noise = NULL,
support.noise.points = c(1/3, 1/3, 1/3),
weight = 0.5,
twosteps.n = 1,
method = c("dual.BFGS", "dual.lbfgsb3c", "dual", "primal.solnl", "primal.solnp",
"dual.CG", "dual.L-BFGS-B", "dual.Rcgmin", "dual.bobyqa", "dual.newuoa",
"dual.nlminb", "dual.nlm", "dual.lbfgs", "dual.optimParallel"),
caseGLM = c("D", "M", "NM"),
boot.B = 0,
boot.method = c("residuals", "cases", "wild"),
seed = 230676,
OLS = TRUE,
verbose = 0
)
Arguments
formula |
a "formula" describing the linear model to be fit. For details
see |
data |
A |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when the data
contain |
offset |
this can be used to specify an a priori known component to be
included in the linear predictor during fitting. This should be |
contrasts |
An optional list. See the |
trim |
The trimming proportion (see |
reps |
The number of replicates to generate (see
|
start |
The time of the first observation. Either a single number
or a vector of two numbers (the second of which is an integer), which
specify a natural time unit and a (1-based) number of samples into the time
unit (see |
end |
The time of the last observation, specified in the same way as
|
coef.method |
Method used to estimate the coefficients. One of
|
cv |
Boolean value. If |
cv.nfolds |
number of folds used for cross-validation when
|
errormeasure |
Loss function (error) to be used for the selection
of the support spaces. One of c("RMSE","MSE", "MAE", "MAPE", "sMAPE", "MASE").
The default is |
errormeasure.which |
Which value of |
support.method |
One of c("standardized", "ridge"). If
|
support.method.penalize.intercept |
Boolean value. if |
support.signal |
|
support.signal.vector |
NULL or a vector of positive values when
|
support.signal.vector.min |
A positive value for the lowest limit of the
|
support.signal.vector.max |
A positive value for the highest limit of the
|
support.signal.vector.n |
A positive integer for the number of support
spaces to be used when |
support.signal.points |
A positive integer, a vector or a matrix. Prior
weights for the signal. If not a positive integer then the sum of weights by
row must be equal to 1. The default is
|
support.noise |
An interval, preferably centered around zero, given in
the form |
support.noise.points |
A positive integer, a vector or a matrix. Prior
weights for the noise. If not a positive integer then the sum of weights by
row must be equal to 1. The default is
|
weight |
a value between zero and one representing the
prediction-precision loss trade-off. If |
twosteps.n |
Number of GCE reestimations using a previously estimated vector of signal probabilities. |
method |
Use |
caseGLM |
special cases of the generic general linear model. One of
|
boot.B |
A single positive integer greater or equal to 10 for the number
of bootstrap replicates to be used for the computation of the bootstrap
confidence interval(s). Zero value will generate no replicate. The default
is |
boot.method |
Method to be use for bootstrapping. One of
|
seed |
A single value, interpreted as an integer, for reproducibility
or |
OLS |
Boolean value. if |
verbose |
An integer to control how verbose the output is. For a value
of 0 no messages or output are shown and for a value of 3 all messages
are shown. The default is |
Details
The tsbootgce
function fits several linear regression models via
generalized cross entropy in replicas of time series obtained using
meboot
. Models for tsbootgce
are specified
symbolically (see lm
and dynlm
).
Value
tsbootgce
returns an object of class
tsbootgce
.
The generic accessory functions coef.tsbootgce
,
confint.tsbootgce
and plot.tsbootgce
extract
various useful features of the value returned by object
of class
tsbootgce
.
An object of class
tsbootgce
is a list containing at
least the following components:
call |
the matched call. |
coefficients |
a named data frame of coefficients determined by
|
data.ts |
|
error |
loss function (error) used for the selection of the support spaces. |
error.measure |
in sample error for the selected support space. |
fitted.values |
the fitted mean values. |
frequency |
see |
index |
see |
lmgce |
|
meboot |
|
model |
the model frame used. |
nep |
normalized entropy of the signal of the model. |
nepk |
normalized entropy of the signal of each coefficient. |
residuals |
the residuals, that is response minus fitted values. |
results |
a list containing the bootstrap results: "coef.matrix", a named data frame of all the coefficients; "nepk.matrix", a named data frame of all the normalized entropy values of each parameter; "nep.vector", a vector of all the normalized entropy values of the model. |
seed |
the seed used. |
terms |
the |
x |
if requested (the default), the model matrix used. |
xlevels |
(only where relevant) a record of the levels of the factors used in fitting. |
y |
if requested (the default), the response used. |
Author(s)
Jorge Cabral, jorgecabral@ua.pt
References
Golan, A., Judge, G. G. and Miller, D. (1996)
Maximum entropy econometrics : robust estimation with limited data.
Wiley.
Golan, A. (2008)
Information and Entropy Econometrics — A Review and Synthesis.
Foundations and Trends® in Econometrics, 2(1–2), 1–145.
doi:10.1561/0800000004
Golan, A. (2017)
Foundations of Info-Metrics: Modeling, Inference, and Imperfect Information (Vol. 1).
Oxford University Press.
doi:10.1093/oso/9780199349524.001.0001
Hyndman, R.J. (1996)
Computing and graphing highest density regions.
American Statistician, 50, 120-126.
doi:10.2307/2684423
Pukelsheim, F. (1994)
The Three Sigma Rule.
The American Statistician, 48(2), 88–91.
doi:10.2307/2684253
Vinod, H. D., & Lopez-de-Lacalle, J. (2009). Maximum Entropy Bootstrap for Time Series: The meboot R Package. Journal of Statistical Software, 29(5), 1–19. doi:10.18637/jss.v029.i05
See Also
The generic functions plot.tsbootgce
, print.tsbootgce
,
and coef.tsbootgce
.
Examples
res.tsbootgce <-
tsbootgce(
formula = CO2 ~ 1 + L(GDP, 1) + L(EPC, 1) + L(EU, 1),
data = moz_ts)
res.tsbootgce