a research paper about FDSLRM modeling with supplementary materials - software, notebooks
| Table of Contents | Data and model | MLE | REMLE | References |
Authors: Andrej Gajdoš, Jozef Hanč, Martina Hančová
Faculty of Science, P. J. Šafárik University in Košice, Slovakia
email: [email protected]
MLE, REMLE for electricity consumption 1
R-based computational tools - fdslrm, nlme, MMEinR(mixed), sommer
Table of Contents
Data and model - data and model description of empirical data
MLE - computation by standard packages nlme, MMEinR(mixed) and fdslrm
REMLE - computation by standard package nlme, MMEinR(mixed), sommer and fdslrm
To get back to the table of contents, use the Home key.
In this FDSLRM application, we model the econometric time series data set, representing the hours observations of the consumption of the electric energy in some department store. The number of time series observations is . The data was adapted from Štulajter & Witkovský, 2004 and the FDSLRM model from Gajdoš et al 2017.
The consumption data can be fitted by the following Gaussian orthogonal FDSLRM:
where
nlme: Linear and Nonlinear Mixed Effects Models
Purpose: R package to fit and compare Gaussian linear and nonlinear mixed-effects models
Version: 3.1-140, 2019
Key tool:
lme
function for fitting LMMComputational parameters of
lme
:
maxIter
- maximum number of iterations (default: 50). *msMaxIter
- maximum number of iterations for the optimization step (default: 50). *tolerance
- tolerance for the convergence criterion (default: 1e-6). *niterEM
- number of iterations for the EM algorithm used to refine the initial estimates of the random effects (default: 25). *msMaxEval
- maximum number of evaluations of the objective function permitted for optimizer nlminb (default: 200). *msTol
- tolerance for the convergence criterion on the first iteration when optim is used (default is 1e-7). *.relStep
- relative step for numerical derivatives calculations. Default is.Machine$double.eps^(1/3)
while.Machine$double.eps = 2.220446e-16
. *opt
- the optimizer to be used, either "nlminb" (the default) or "optim". *optimMethod
- the optimization method, a version of quasi-Newton method to be used with the optim optimizer (default:"BFGS", alternative: "L-BFGS-B") *minAbsParApVar
- numeric value - minimum absolute parameter value in the approximate variance calculation (default: 0.05).
fdslrm: Time series analysis and forecasting using LMM
Purpose: R package for modeling and prediction of time series using linear mixed models.
Version: 0.1.0, 2019
Depends: kableExtra, IRdisplay, MASS, Matrix, car, nlme, stats, forecast, fpp2, matrixcalc, sommer, gnm, pracma, CVXR
Maintainer: Andrej Gajdoš
Authors: Andrej Gajdoš, Jozef Hanč, Martina Hančová
Installation: Run jupyter notebook
00 installation fdslrm.ipynb
once before the first run of any R-based Jupyter notebook.
fdslrm (nlme)
function fitDiagFDSLRM
via parameter "lme"
implements lme
function from nlme
MMEinR
R version of Witkovský's MATLAB function mixed
https://www.mathworks.com/matlabcentral/fileexchange/200
Purpose: R function to estimate parameters of a linear mixed model (LMM) with a simple variance components structure
Computational parameters of
MMEinR (mixed)
:
tolerance for the convergence criterion (
epss = 1e-8
)iterative method solving Henderson's mixed model equations
function return the estimates of variance parameters in a different order: in comparison with other tools
fdslrm (MMEinR)
function fitDiagFDSLRM
via parameter "mixed"
implements R version of MATLAB mixed
function
nlme
fdslrm (nlme)
MMEinR
fdslrm (MMEinR)
sommer: Solving Mixed Model Equations in R
Purpose: R package - structural multivariate-univariate linear mixed model solver for multiple random effects and estimation of unknown variance-covariance structures (i.e. heterogeneous and unstructured variance models). Designed for genomic prediction and genome wide association studies (GWAS), particularly focused in the > problem (more coefficients than observations) to include multiple known relationship matrices and estimate complex unknown covariance structures. Spatial models can be fitted using the two-dimensional spline functionality in sommer.
Version: 3.9.3, 2019
Key tool:
mmer
function for fittingcomputational parameters of
mmer
:
iters
- maximum number of iterations (default: 20). *tolpar
- tolerance for the convergence criterion for the change in loglikelihood (default: 1e-03) *tolparinv
- tolerance parameter for matrix inverse used when singularities are encountered (default:1e-06). *method
- this refers to the method or algorithm to be used for estimating variance components (default: NR, direct-inversion Newton-Raphson method, alternative: AI, Average Information) * function return the estimates of variance parameters in a different order: in comparison with other tools
fdslrm (sommer)
function fitDiagFDSLRM
via parameter "mmer"
implements mmer
function from sommer
References
This notebook belongs to suplementary materials of the paper submitted to Statistical Papers and available at https://arxiv.org/abs/1905.07771.
Hančová, M., Vozáriková, G., Gajdoš, A., Hanč, J. (2019). Estimating variance components in time series linear regression models using empirical BLUPs and convex optimization, https://arxiv.org/, 2019.
Abstract of the paper
We propose a two-stage estimation method of variance components in time series models known as FDSLRMs, whose observations can be described by a linear mixed model (LMM). We based estimating variances, one of the steps in a time series forecasting approach called kriging, on the empirical (plug-in) best linear unbiased predictions of unobservable random components in FDSLRM.
The method, providing invariant non-negative quadratic estimators, can be used for any absolutely continuous probability distribution of time series data. As a result of applying the convex optimization and the LMM methodology, we resolved two problems theoretical existence and equivalence between least squares estimators, non-negative (M)DOOLSE, and maximum likelihood estimators, (RE)MLE, as possible starting points of our method and a practical lack of computational implementation for FDSLRM. As for computing (RE)MLE in the case of observed time series values, we also discovered a new algorithm of order , which at the default precision is times more accurate and times faster than the best current Python(or R)-based computational packages, namely CVXPY, CVXR, nlme, sommer and mixed.
We illustrate our results on three real data sets electricity consumption, tourism and cyber security which are easily available, reproducible, sharable and modifiable in the form of interactive Jupyter notebooks.
Gajdoš, A., Hančová, M., Hanč, J. (2017). Kriging Methodology and Its Development in Forecasting Econometric Time Series. Statistica: Statistics and Economy Journal, 2017, 1, Vol. 97, pp. 59–73.
Štulajter, F., Witkovský, V. (2004). Estimation of Variances in Orthogonal Finite Discrete Spectrum Linear Regression Models. Metrika, 2004, vol. 60, num. 2, s. 105–118. ISSN 0026-1335.
| Table of Contents | Data and model | MLE | REMLE | References |