-
Notifications
You must be signed in to change notification settings - Fork 22
Model Information
This page documents methods for extracting dimensional and scale information from fitted smooth models.
| Function | Returns | Type |
|---|---|---|
nobs() |
Number of observations | integer |
nparam() |
Parameter counts | matrix |
sigma() |
Residual standard deviation | numeric |
extractScale() |
Scale parameter(s) | numeric/vector |
For model type methods (modelType(), modelName(), errorType()), see Model-Specification.
For structural methods (orders(), lags()), see Orders-and-Lags.
For formula method, see Explanatory-Variables.
Returns the number of observations used in model estimation.
model <- adam(AirPassengers, "MMM", lags=12, h=12, holdout=TRUE)
# Number of observations
nobs(model) # 132 (144 - 12 holdout)from smooth import ADAM
model = ADAM(model="MMM", lags=12)
model.fit(y)
# Number of observations
n = model.nobsR: Returns an integer with the number of in-sample observations.
Python: Returns an int with the number of observations used for fitting.
When holdout=TRUE, nobs() returns the number of in-sample observations (excluding holdout).
Returns the number of estimated parameters in the model, broken down by category.
model <- adam(AirPassengers, "MMM", lags=12)
# Number of estimated parameters
nparam(model)from smooth import ADAM
model = ADAM(model="MMM", lags=12)
model.fit(y)
# Number of estimated parameters
n_params = model.nparamR: Returns the number of estimated parameters, with detailed breakdown available via model$nParam.
Python: Returns an int with the total number of estimated parameters.
model <- adam(AirPassengers, "MAM", lags=12)
nparam(model)The more detailed information about parameters can be accessed via:
model$nParamReturns the residual standard deviation (scale parameter) of the model.
model <- adam(AirPassengers, "MMM", lags=12)
# Residual standard deviation
sigma(model)from smooth import ADAM
model = ADAM(model="MMM", lags=12)
model.fit(y)
# Residual standard deviation
scale = model.sigmaR: Returns a numeric value with the residual standard deviation.
Python: Returns a float with the scale/standard error estimate.
The scale of the sigma depends on the type of the error in the model. If it was the additive error, the scale will be in the original units. If it was the multiplicative one, sigma will have the interpretation closer to variability percents.
Extracts the scale parameter from the model, including time-varying scale if a Scale-Model was fitted.
# Basic model
model <- adam(AirPassengers, "MMM", lags=12)
extractScale(model) # Single value
# With scale model
scaleModel <- sm(model, model="MNM", lags=12)
fullModel <- implant(model, scaleModel)
extractScale(fullModel) # Time series of scale values- ADAM - Main ADAM function
- Model-Specification - Model type methods (modelType, modelName, errorType)
- Orders-and-Lags - orders() and lags() methods
- Explanatory-Variables - formula() method
- Coefficients-and-Parameters - Extracting parameters
- Visualisation-and-Output - Model output methods
- Scale-Model - Time-varying scale