R6 class that stores the component specifications and control settings used
to initialize and fit a solarModel object.
An R6 object of class solarModel_spec.
Version 1.0.3
outliersList containing detected outlier information.
placeCharacter, optional name of the location considered.
coordsA named list with coordinates for the selected location. Contains:
Numeric, reference latitude in degrees.
Numeric, reference longitude in degrees.
Numeric, reference altitude in metres.
targetCharacter, name of the target variable to model. Can be "GHI" or "clearsky".
locationA Tibble with the name and the coordinates of the location considered. Contains:
Character, selected location
Target variable
Numeric, reference latitude in degrees.
Numeric, reference longitude in degrees.
Numeric, reference altitude in metres.
model_nameCharacter, standard model's name.
datesA named list with three sub-lists: data for the complete dataset,
train for the training dataset, and test for the test dataset.
Each sub-list is structured as follows:
Character date, minimum date in the dataset.
Character date, maximum date in the dataset.
Integer scalar, number of observations contained in the dataset between from and to.
Numeric scalar, percentage of data in the dataset with respect to the complete data.
dataTibble, dataset with CAMS solar radiation data.
transformA solarTransform object with the transformation applied to the data.
seasonal_model_CtA seasonalClearsky object with the clear-sky model applied to the data.
seasonal.meanA seasonalModel object with the seasonal model applied to the data.
mean.modelAn ARMA_modelR6 object with the ARMA model applied to the data.
seasonal.varianceA seasonalModel object with the seasonal variance applied to the data.
variance.modelAn sGARCH object with the GARCH model applied to the data.
mixture.modelA solarMixture object with the monthly Gaussian Mixture models applied to the data.
coefficientsGet the model parameters as a named list.
std.errorsGet model parameter standard errors as a named list.
hessianGet the model hessian.
jacobianGet the model jacobian.
clearsky_thresholdNumeric, parameter > 1, used to scale up CAMS clearsky.
stochastic_clearskyLogical, when TRUE the clear sky is considered stochastic.
quietLogical. If TRUE, suppress messages where supported.
set_params()Set general controls.
solarModel_spec$set_params(
stochastic_clearsky = FALSE,
clearsky_threshold = 1.01,
quiet = FALSE
)set_transform()Control parameters for the solarTransform. See solarTransform for more details.
solarModel_spec$set_transform(
min_pos = 1,
max_pos = 1,
link = "invgumbel",
delta = 0.05,
threshold = 0.01
)min_posInteger, position of the minimum. For example when 2 the minimum is the second lowest value.
max_posInteger, position of the maximum. For example when 3 the maximum is the third greatest value.
linkCharacter, link function.
deltaNumeric. Small adjustment used around fitted transformation bounds.
thresholdNumeric. Threshold used to estimate the transformation parameters $$\alpha$$ and $$\beta$$.
The default is 0.01. See solarTransform for more details.
set_clearsky()List with specification's parameters of the clear sky model.
solarModel_spec$set_clearsky(
spec = seasonalClearsky_spec(),
control = control_seasonalClearsky()
)specNamed list, model's specification. See the function seasonalClearsky_spec for more details.
controlNamed list, control parameters. See the function control_seasonalClearsky for more details.
set_seasonal.mean()List with specification's parameters of the seasonal mean \(\bar{Y}_t\) for \(Y_t\).
solarModel_spec$set_seasonal.mean(
order = 1,
period = 365,
include.trend = FALSE,
include.intercept = TRUE,
monthly.mean = FALSE
)orderInteger. Specify the order of the seasonal mean $$\bar{Y}_t$$. The default is 1.
periodInteger, seasonal periodicity, the default is 365.
include.trendLogical. When TRUE an yearly trend $$t$$ will be included in the seasonal model, otherwise will be excluded. The default is FALSE.
include.interceptLogical. When TRUE the intercept $$a_0$$ will be included in the seasonal model, otherwise will be excluded. The default is TRUE.
monthly.meanLogical. When TRUE, monthly means are computed on the deseasonalized series $$\tilde{Y}_t = Y_t - \bar{Y}_t$$
and subtracted from the series.
set_mean.model()List with specification's parameters of the ARMA model for deseasonalized series \(\tilde{Y}_t = Y_t - \bar{Y}_t\).
arOrderInteger. An integer specifying the order of the AR component. The default is 1.
maOrderInteger. An integer specifying the order of the MA component. The default is 0.
include.interceptLogical. When TRUE the intercept $$\phi_0$$ will be included in the seasonal model, otherwise will be excluded. The default is FALSE.
set_seasonal.variance()List with specification's parameters of the seasonal variance \(\bar{\sigma}_t\) for ARMA's residuals \(e_t\)
solarModel_spec$set_seasonal.variance(
order = 1,
period = 365,
include.trend = FALSE,
correction = FALSE,
monthly.mean = FALSE
)orderInteger. Specify the order of the seasonality of the seasonal variance. The default is 1.
periodInteger, seasonal periodicity, the default is 365.
include.trendLogical. When TRUE an yearly trend $$t$$ will be included in the seasonal model, otherwise will be excluded. The default is FALSE.
correctionLogical. When TRUE, seasonal variance parameters are corrected to target unit variance for standardized residuals.
monthly.meanLogical. When TRUE a vector of 12 monthly std. deviations will be computed
on the standardized residuals $$\tilde{\varepsilon}_t$$ and used to standardize the time series
by month.
set_variance.model()List with specification's parameters of the GARCH variance \(\sigma_t\) for deseasonalized residuals \(\tilde{e}_t = e_t/\bar{\sigma}_t\).
set_mixture.model()List with specification's parameters of the Gaussian mixture model for GARCH residuals \(u_t = \tilde{e}_t/\sigma_t\).
solarModel_spec$set_mixture.model(
abstol = 1e-20,
match.expectation = FALSE,
match.variance = FALSE,
match.empiric = FALSE,
method = "mclust",
maxit = 5000,
maxrestarts = 500
)abstolNumeric. Absolute level for convergence of the EM-algorithm. The default is 1e-20.
match.expectationLogical. If TRUE, mixture parameters are fitted with an expectation-matching constraint.
match.varianceLogical. If TRUE, mixture parameters are fitted with a variance-matching constraint.
match.empiricLogical, when TRUE and match.expectation = TRUE or match.variance = TRUE the mixture parameters
will be estimated ensuring that mean and variance matches the empirical parameters. Otherwise if FALSE and
match.expectation = TRUE or match.variance = TRUE the target expectation will be zero and the target variance 1.
methodCharacter, package used to fit the parameters. Can be mclust or mixtools.
maxitInteger. Maximum number of iterations for EM-algorithm. The default is 5000.
maxrestartsInteger. Maximum number of restarts when EM-algorithm does not converge. The default is 500.
specification()Specification function for a solarModel
placeCharacter, name of an element in the CAMS_data list.
targetCharacter, target variable to model. Can be GHI or clearsky.
min_dateCharacter. Date in the format YYYY-MM-DD. Minimum date for the complete data. If missing will be used the minimum data available.
max_dateCharacter. Date in the format YYYY-MM-DD. Maximum date for the complete data. If missing will be used the maximum data available.
fromCharacter. Date in the format YYYY-MM-DD. Starting date to use for training data.
If missing will be used the minimum data available after filtering for min_date.
toCharacter. Date in the format YYYY-MM-DD. Ending date to use for training data.
If missing will be used the maximum data available after filtering for max_date.
dataOptional data frame for the selected location.
update()Update the parameters inside object
print()Print method for solarModel_spec class.
spec <- solarModel_spec$new()
spec$specification("Bologna", max_date = "2005-01-10")
#> No outliers!
spec$model_name
#> [1] "invgumbel-ARMA(1, 0)-GARCH(1, 1)"