| refit {garchx} | R Documentation | 
Refit a model to new data
Description
Refit a model to new data, typically for cross-validation purposes. Re-estimation (reestimate) is optional (the default is FALSE).
Usage
##generic:
refit(object, ...)
##S3 method for 'garchx' objects:
## S3 method for class 'garchx'
refit(object, newy = NULL, newxreg = NULL,
  backcast.value = NULL, reestimate = FALSE, ...)
Arguments
object | 
 an object of class   | 
newy | 
 vector, the new 'y' data, see   | 
newxreg | 
 the new 'xreg' data, if any, see   | 
backcast.value | 
 
  | 
reestimate | 
 logical. If   | 
... | 
 further arguments passed to or from other methods  | 
Details
refit.garchx is a convenience function to facilitate cross-validation and related analyses. 
Value
A list of class 'garchx'
Author(s)
Genaro Sucarrat, http://www.sucarrat.net/
See Also
Examples
##simulate from a garch(1,1):
set.seed(123)
y <- garchxSim(1000)
##estimate garch(1,1) model:
mymod <- garchx(y)
##new data (e.g. 'out-of-sample' or 'test' data):
yy <- garchxSim(100)
##apply the estimates of 'mymod' on yy data:
refit(mymod, newy=yy)
[Package garchx version 1.5 Index]