<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OJS</journal-id><journal-title-group><journal-title>Open Journal of Statistics</journal-title></journal-title-group><issn pub-type="epub">2161-718X</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ojs.2016.64047</article-id><article-id pub-id-type="publisher-id">OJS-68871</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Development of a Modelling Script of Time Series Suitable for Data Mining
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Víctor</surname><given-names>Sanz-Fernández</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Rubén</surname><given-names>Muñoz-Lechuga</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Antonio</surname><given-names>Sánchez-Navas</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Ivone</surname><given-names>A. Czerwinski</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Remedios</surname><given-names>Cabrera</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff2"><addr-line>Departamento de Estadística e Investigación Operativa, Facultad de Ciencias, Universidad de Cádiz, Puerto Real, Cádiz, Spain</addr-line></aff><aff id="aff1"><addr-line>Departamento de Biología, Facultad de Ciencias del Mar y Ambientales, Universidad de Cádiz, Campus de Excelencia Internacional del Mar (CEIMAR), Puerto Real, Cádiz, Spain</addr-line></aff><pub-date pub-type="epub"><day>22</day><month>07</month><year>2016</year></pub-date><volume>06</volume><issue>04</issue><fpage>555</fpage><lpage>564</lpage><history><date date-type="received"><day>30</day>	<month>May</month>	<year>2016</year></date><date date-type="rev-recd"><day>accepted</day>	<month>19</month>	<year>July</year>	</date><date date-type="accepted"><day>22</day>	<month>July</month>	<year>2016</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Data Mining has become an important technique for the exploration and extraction of data in numerous and various research projects in different fields (technology, information technology, business, the environment, economics, etc.). In the context of the analysis and visualisation of large amounts of data extracted using Data Mining on a temporary basis (time-series), free software such as R has appeared in the international context as a perfect inexpensive and efficient tool of exploitation and visualisation of time series. This has allowed the development of models, which help to extract the most relevant information from large volumes of data. In this regard, a script has been developed with the goal of implementing ARIMA models, showing these as useful and quick mechanisms for the extraction, analysis and visualisation of large data volumes, in addition to presenting the great advantage of being applied in multiple branches of knowledge from economy, demography, physics, mathematics and fisheries among others. Therefore, ARIMA models appear as a Data Mining technique, offering reliable, robust and high-quality results, to help validate and sustain the research carried out.
 
</p></abstract><kwd-group><kwd>Data Mining</kwd><kwd> ARIMA Models</kwd><kwd> Time Series</kwd><kwd> Script</kwd><kwd> R</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Literature review</title><p>During the last few years and due to the numerous advances in information systems, the use of means designed for the acquisition of data such as web and mobile applications, social networks, etc. has massively increased. As a result of this “information revolution”, the world of science has been saturated with data of varied origin. It is estimated that 90% of all data have been created in the last two years (2013-2015) [<xref ref-type="bibr" rid="scirp.68871-ref1">1</xref>] . At the IOD (Information On Demand) Conference held in 2011, IBM presented the explosion of data in today’s society as a problem, and put forward how companies are facing the challenge of obtaining relevant and valuable information from this vast amount of data. The amount of data in the world is expected to double every two years, according to the data scientist Mark van Rijmenam, founder of Datafloq, in addition to increase 2.5 exabytes per day [<xref ref-type="bibr" rid="scirp.68871-ref1">1</xref>] .</p><p>This enormous amount of information is known as Big Data. The vast majority of these data, which come from astronomy, genomics, telephony, credit card transactions, Internet traffic and web information processing, primarily, are acquired systematically with a certain frequency, being therefore time series [<xref ref-type="bibr" rid="scirp.68871-ref2">2</xref>] - [<xref ref-type="bibr" rid="scirp.68871-ref4">4</xref>] . The tendency to manipulate large quantities of data is due to the need, in many cases, to include the data obtained from the analysis of large databases in new databases, such as business analyses [<xref ref-type="bibr" rid="scirp.68871-ref5">5</xref>] . Besides data manageability, other factors to consider are the speed of analysis/scanning speed, access, search and return of any element. It is important to understand that conventional databases are a significant and relevant part of an analytical solution [<xref ref-type="bibr" rid="scirp.68871-ref6">6</xref>] [<xref ref-type="bibr" rid="scirp.68871-ref7">7</xref>] .</p><p>Today, the explosion of data poses a problem given the amount of these increases overwhelmingly; in fact this situation reaches occasionally the point when it is not possible to gain an useful insight from them. Therefore, it is necessary to organise, classify, quantify and of course exploit this information to obtain maximum performance for the benefit of scientific research. In response to this difficulty the concept of Data Mining arises that refers to the non-trivial automated process which identifies valid, previously unknown, potentially useful and funda- mentally understandable patterns in the data.</p><p>The literature shows that Data Mining techniques are used to extract information from very diverse back- grounds as the power consumption of a region [<xref ref-type="bibr" rid="scirp.68871-ref8">8</xref>] , modelling and optimisation of wastewater pumping systems [<xref ref-type="bibr" rid="scirp.68871-ref9">9</xref>] and the establishment of the position of wind turbines to obtain the maximum possible wind currents [<xref ref-type="bibr" rid="scirp.68871-ref10">10</xref>] .</p><p>A common pattern of all previous studies is the use of time series for the analysis and visualisation of information. A way to perform the processing of time series is through the creation of mathematical models that identify and predict their behaviour. One of these are the ARIMA models [<xref ref-type="bibr" rid="scirp.68871-ref11">11</xref>] , that extract the most relevant data from the dataset identifying the patterns of the series at different levels of the timescale and simplify a large amount of data in a simple equation, hence their utility and application in Data Mining. ARIMA models are within the Data Mining techniques, as these are used in time series, therefore being a very useful tool to extract relevant information from Big Data.</p><p>In the field of the analysis and visualisation of data, the development of free software is a good tool for both analytical and visual integration of information. In this section of the processing of data, software for the analysis and visualisation of data allow to work with large volumes of data completed over a period of time [<xref ref-type="bibr" rid="scirp.68871-ref12">12</xref>] . The development of statistical software that allows to work on the analysis of time series further facilitates the implementation of ARIMA models.</p><p>The use of free access software as Rstudio, which is an integrated development environment for R, has the advantage of enabling programming statistical packages as required, as well as of applying all kinds of time series analysis, in addition to reducing economic costs in any research project. In the present work a script has been developed in the environment of programming R language that allows the implementation, processing and visualisation of ARIMA models, in order to make it easier for scientists to know about the exploration, exploitation and manipulation of large volumes of univariate data carrying associated timescales. The script development and implementation structure is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><p>this script achieves the implementation of the Box-Jenkins methodology [<xref ref-type="bibr" rid="scirp.68871-ref11">11</xref>] for the development of ARIMA-models; in this way, the researcher is able to decompose the time series and to obtain the most relevant information of the characteristics of the temporal series, showing the extent to which this script helps in the exploration, exploitation and manipulation of data.</p></sec><sec id="s2"><title>2. Information about the ST.R File</title><p>This document provides information about what is and how to use the ST.R script.</p><sec id="s2_1"><title>2.1. What Is ST.R?</title><p>ST.R is a code in R language developed for the treatment of time series and the realisation of ARIMA models following the Box-Jenkins methodology [<xref ref-type="bibr" rid="scirp.68871-ref11">11</xref>] . The script is split into two blocks. The first one is a collection of</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Structure of development and implementation of the script in R. The different actions to be followed for the implementation of the script are shown. It is a conceptual model of implementation where Excel is used as a possible tool for data management. Source: own elaboration</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1240709x7.png"/></fig><p>commands for the numerical and graphic description of the time series, and the development of the ARIMA models. In the second block the commands of different precision measurements are set up, which allow to compare the forecasts made by the models with the actual data with the aim of selecting the model with the most optimal fit to actual observations [<xref ref-type="bibr" rid="scirp.68871-ref13">13</xref>] [<xref ref-type="bibr" rid="scirp.68871-ref14">14</xref>] .</p></sec><sec id="s2_2"><title>2.2. How to Use ST.R</title><p>In order to successfully run the ST.R script, the necessary libraries are lmtest and tseries. These libraries are available from the repository Comprehensive R Archive Network (CRAN) at http://CRAN.R-project.org/package=OptGS. In this work, the R “stat” package version 3.3.0 was used, using “ARIMA” argument. The fitting methods are described in the R manual [<xref ref-type="bibr" rid="scirp.68871-ref15">15</xref>] .</p></sec><sec id="s2_3"><title>2.3. ST.R Structure</title><p>1) Graphical representation: graphical representation of the time series to visualise its components (trend, cycle, stationarity and random or irregular component (<xref ref-type="fig" rid="fig2">Figure 2</xref> and <xref ref-type="fig" rid="fig3">Figure 3</xref>).</p><p>2) Trend analysis: the existence or non-existence of the trend is studied from the graphical results. A linear trend will be removed with first differences. However, for a nonlinear trend two differences are used. The Dickey-Fuller [<xref ref-type="bibr" rid="scirp.68871-ref16">16</xref>] and KPSS [<xref ref-type="bibr" rid="scirp.68871-ref17">17</xref>] tests are used for the analysis (<xref ref-type="fig" rid="fig4">Figure 4</xref>).</p><p>3) Homocedasticity analysis: This is done from both a visual and a mathematical perspective. From a visual point of view, it is carried out through the study of the thickness of the series. If this thickness remains constant, with no major irregularities observed, the series will be homocedastic; otherwise, the series will be considered heterocedastic. From a mathemathical, it is carried out with the application of the homoscedasticity Breusch- pagan test [<xref ref-type="bibr" rid="scirp.68871-ref18">18</xref>] (<xref ref-type="fig" rid="fig5">Figure 5</xref>).</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> An R Graphical User Interface (GUI) for step 1. Graphical representation</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1240709x8.png"/></fig><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> An R Graphical User Interface (GUI) for step 1. Graphical representation</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1240709x9.png"/></fig><p>4) Stationarity analysis: As a result of the steps above, when neither seasonal cycle, nor trend, nor a significant thickness alteration of the series are to be perceived, the series is regarded as stationary (<xref ref-type="fig" rid="fig5">Figure 5</xref>).</p><p>5) Model identification: the most optimal model type is determined from the order of the Autoregressive procedure and moving averages of the constituents, both uniform and seasonal. This choice is made from autocorrelation (FAC) and partial autocorrelation (partial FAC) functions (<xref ref-type="fig" rid="fig5">Figure 5</xref>).</p><p>6) Estimation of the coefficients of the model: the order of the model having been established, the estimation of its parameters is made. Given it is an iterative calculation process, initial values (pool of models) can be suggested (<xref ref-type="fig" rid="fig5">Figure 5</xref>).</p><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> An R Graphical User Interface (GUI) for step 2. Trend analysis</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1240709x10.png"/></fig><fig id="fig5"  position="float"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> An R Graphical User Interface (GUI) for steps 3 - 7, 10. Homocedasticity analysis; stationarity analysis; model identification; estimation of the coefficients of the model; detailed error analysis; forecast</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1240709x11.png"/></fig><p>7) Detailed error analysis: It is made from the verified differences between values observed empirically and estimated by the model for their final assessment. It is necessary to check an inconsistent regime of them and analyse the existence of significant errors. The Ljung-Box test is applied [<xref ref-type="bibr" rid="scirp.68871-ref19">19</xref>] (<xref ref-type="fig" rid="fig5">Figure 5</xref>).</p><p>8) Contrast of model validity: the model or models initially selected are quantified and valued using various statistical measures. The measures applied are: R<sup>2</sup> (coefficient of determination), % SEP (standard error percentage), E<sub>2</sub> (coefficient of efficiency), ARV (average relative variance), AIC (Akaike information criterion), RMSE (root mean square error) and MAE (mean absolute error) (<xref ref-type="fig" rid="fig6">Figure 6</xref>).</p><p>9) Model selection: based on the results of the previous steps, the model to work on is decided upon (<xref ref-type="fig" rid="fig6">Figure 6</xref>).</p><p>10) Forecast: the most optimal model will be used as the prediction base tool (<xref ref-type="fig" rid="fig5">Figure 5</xref>).</p></sec><sec id="s2_4"><title>2.4. ARIMA Models</title><p>The univariate ARIMA models (p,d,q) [<xref ref-type="bibr" rid="scirp.68871-ref11">11</xref>] try to explain the behaviour of a time series from past observations of the series itself and from past forecast errors. The compact notation of the ARIMA models is as follows:</p><disp-formula id="scirp.68871-formula1"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1240709x12.png"  xlink:type="simple"/></disp-formula><p>where p is the number of autoregressive parameters, d is the number of differentiations for the series to be stationary, and q is the number of parameters of moving averages. The Box-Jenkins model (p,q) is represented by the following equation:</p><disp-formula id="scirp.68871-formula2"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1240709x13.png"  xlink:type="simple"/></disp-formula><p>The autoregressive part (AR) of the model is<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1240709x14.png" xlink:type="simple"/></inline-formula>, while the part of moving averages of the</p><fig id="fig6"  position="float"><label><xref ref-type="fig" rid="fig6">Figure 6</xref></label><caption><title> An R Graphical User Interface (GUI) for steps 8 and 9. Contrast of model validity; model selection</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1240709x21.png"/></fig><p>from the data, by means of any consistent statistic. The ARIMA models allow fitting the trend plus the stationarity in data. In this case, the model is noted as:</p><disp-formula id="scirp.68871-formula3"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1240709x22.png"  xlink:type="simple"/></disp-formula><p>where P is the number of autoregressive parameters in the seasonal part, D is the number of differentiations for the series to be seasonal in the seasonal part, Q is the number of parameters of moving averages in the seasonal part and S is the series frequency.</p><p>The Box-Jenkins method provides forecasts without any previous conditions, apart from being parsimonious with regard to coefficients [<xref ref-type="bibr" rid="scirp.68871-ref20">20</xref>] . Once the model has been found, forecasts and comparisons between actual and estimated data for observations from the past can be done immediately [<xref ref-type="bibr" rid="scirp.68871-ref21">21</xref>] .</p><p>The identification of the parameters p, q, P, Q and S is done by inspecting the autocorrelation function (ACF) and the partial autocorrelation function (PACF), taking into account differentiation and seasonal differentiation [<xref ref-type="bibr" rid="scirp.68871-ref22">22</xref>] .</p><p>To create models, the most suitable values of p, d and q were used, according to the measures of accuracy which are presented in the section of criteria for model selection. The parameters ϕ and θ are set through the use of the function minimisation procedures so that the square sum of residues be minimised.</p><p>The time series trend is studied applying the Dickey-Fuller [<xref ref-type="bibr" rid="scirp.68871-ref16">16</xref>] and KPSS [<xref ref-type="bibr" rid="scirp.68871-ref17">17</xref>] tests. The Dickey-Fuller test contrasts the null hypothesis that there is a unit root in the autoregressive polynomial (non-stationary series) against the alternative hypothesis that holds the opposite. The KPSS is another test with the same aim, but not exclusive of autoregressive models, supplementary of the former, which contrasts the null hypothesis that the series is stationary around a deterministic trend against the unit root alternative (non-stationary series). Homoscedasticity is studied through the Breusch-Pagan test [<xref ref-type="bibr" rid="scirp.68871-ref18">18</xref>] , which contrasts the null hypothesis that holds heteroscedasticity exists against its nonexistence.</p></sec><sec id="s2_5"><title>2.5. Model Selection Criteria</title><p>The correlation between the actual and forecast data for a variable (x) is expressed by using the correlation coefficient. The coefficient of determination (R<sup>2</sup>) describes the proportion of total variation in the actual data, which can be explained by the model. The coefficient of determination shows a range of variation [0-1]. If R<sup>2</sup> = 1, it means a perfect linear fit, that is to say the proportion of total variation in the actual data is explained by the model. Instead if R<sup>2</sup> = 0, the model does not explain anything of the proportion of total variation in the actual data [<xref ref-type="bibr" rid="scirp.68871-ref23">23</xref>] .</p><p>Other selection measures applied in R are the standard error of prediction percentage (% SEP) [<xref ref-type="bibr" rid="scirp.68871-ref24">24</xref>] , the efficiency coefficient (E<sub>2</sub>) [<xref ref-type="bibr" rid="scirp.68871-ref25">25</xref>] [<xref ref-type="bibr" rid="scirp.68871-ref26">26</xref>] , the average relative variance (ARV) [<xref ref-type="bibr" rid="scirp.68871-ref27">27</xref>] and the Akaike information criterion (AIC) [<xref ref-type="bibr" rid="scirp.68871-ref28">28</xref>] . The first four estimators are unbiased estimators which are used in order to check to what extent the model is able to explain the total variance of the data, while the AIC uses the maximum likelihood function to select the model which best fits data. Moreover, it is advisable to quantify the error in the same units as the studied variable.</p><p>These measures, or absolute error measures, include the root mean squared error (RMSE) and the mean absolute error (MAE), both expressed as follows:</p><disp-formula id="scirp.68871-formula4"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1240709x23.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.68871-formula5"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1240709x24.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1240709x25.png" xlink:type="simple"/></inline-formula> is the variable observed at moment t, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1240709x26.png" xlink:type="simple"/></inline-formula>is the estimated variable at the same moment t and N is the</p><p>total number of observations of the validation set.</p><p>The standard error of forecast percentage, % SEP, is defined as:</p><disp-formula id="scirp.68871-formula6"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1240709x27.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1240709x28.png" xlink:type="simple"/></inline-formula> is the average of the variable observed of the validation set. The main advantage of %SEP is its non-dimensionality, which allows to compare the forecasts of the different models on the same base.</p><p>The efficiency coefficient (E<sub>2</sub>) and the average relative variance (ARV) are used to verify how the model explains the total variance of data and to represent the proportion of the variation of the data observed considered for the model. E<sub>2</sub> and ARV are defined as:</p><p><img data-original="http://html.scirp.org/file/1-1240709x29.png" />,<img data-original="http://html.scirp.org/file/1-1240709x30.png" /> (7)</p><p>The sensitivity to the atypical values due to squaring the terms of the difference is associated to E<sub>2</sub> or to ARV. The Akaike information criterion (AIC) combines the maximum likelihood theory, theoretical information and information entropy [<xref ref-type="bibr" rid="scirp.68871-ref29">29</xref>] , and is defined by the following equation [<xref ref-type="bibr" rid="scirp.68871-ref30">30</xref>] [<xref ref-type="bibr" rid="scirp.68871-ref31">31</xref>] :</p><disp-formula id="scirp.68871-formula7"><label>(8)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1240709x31.png"  xlink:type="simple"/></disp-formula><p>where N is the total number of observations of the validation set, k is the number of the parameters of the estimated model, MSE is the mean square error estimated, which is defined by the following equation [<xref ref-type="bibr" rid="scirp.68871-ref30">30</xref>] [<xref ref-type="bibr" rid="scirp.68871-ref31">31</xref>] :</p><disp-formula id="scirp.68871-formula8"><label>(9)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1240709x32.png"  xlink:type="simple"/></disp-formula><p>where N is the total number of observations of the validation set, k is the number of parameters of the estimated</p><p>Depending on the fit, a model which explains a high variance level (R<sup>2</sup>, ARV, E<sub>2</sub>) in the validation period is associated to low absolute error (RMSE, MAE), relative (% SEP) and Akaike (AIC) values. Hence, the hypothesis is validated that when using AIC the best model will be that which presents the lowest value, since its likelihood function will fit the data more accurately [<xref ref-type="bibr" rid="scirp.68871-ref28">28</xref>] .</p></sec><sec id="s2_6"><title>2.6. Application</title><p>The nature of information differs now from that of information in the past. Due to the vast amount of measuring devices (sensors, microphones, cameras, medical scanners, images, etc.), the data generated by these elements are the largest of the entire available information spectrum. For this reason, the analysis of the wealth of time series has been carried out in a continuous and frequent way [<xref ref-type="bibr" rid="scirp.68871-ref33">33</xref>] in order to obtain the prediction variables and thus to be able to warn behaviour in the environment these occur.</p><p>The analyses of time series take into account the degree of dependence between observations and allow to obtain valid inferences without violating basic assumptions of the statistical model or introducing variations in order to overlook this problem; this way, the model further fits the real behaviour of the series.</p><p>Since time series are currently employed in different and various fields of knowledge―telecommunications [<xref ref-type="bibr" rid="scirp.68871-ref34">34</xref>] , fisheries [<xref ref-type="bibr" rid="scirp.68871-ref35">35</xref>] , medicine [<xref ref-type="bibr" rid="scirp.68871-ref36">36</xref>] , etc.―it is important to perform a script that allows to give a global and integrated vision on the treatment of time series grouping all the relevant information with the characteristics of the series and prediction models.</p><p>Treatment and analysis of time series using free software such as R presents advantages and disadvantages in comparison with private software. On the one hand R has been used in this work as a free and cross-platformer software, making it easy to work with different operating systems. As it has an open source, it is continuously updated by users, not to mention its great graphical power. On the other hand we are aware that the development of this script in the R programming environment presents a number of drawbacks, such as abundant but unstructured help information or packages and functions that make it difficult to locate specific information in a given search. Error messages do not show clearly where in the development of the script the bug is committed, which creates problems for users with little experience in this programming environment making the initiation tedious. R is a programming language in lines of commands, which does not use menus as other statistical programs (e.g., Statgraphics) interfaces. However this can also be an advantage since R advanced users are able to schedule the treatment and analysis of data, in order to understand the basis of the statistical development and data analysis.</p><p>To this aim the ST.R script has been created, whose main objective is the analysis and development of forecasting models for time series. It can be established that time series models allow to estimate the degree of significance of a level change which is operated as a result of the application of a treatment [<xref ref-type="bibr" rid="scirp.68871-ref37">37</xref>] . These models not only allow to obtain statistical inferences on treatment action, but also solve the problem of dependence inherent to this type of designs which use a single subject.</p><p>In this work, Excel has been used for the database structure management. We know that this system is not sufficiently solvent to support the current data productions [<xref ref-type="bibr" rid="scirp.68871-ref38">38</xref>] . Although Excel is satisfactory for time series management since this working field is univariate based, Excel has also the advantage of being user friendly and accessible for most users. Then this system is considered an efficient tool when it comes to structuring univariate time series.</p></sec></sec><sec id="s3"><title>3. Conclusion</title><p>In conclusion, the present script aims to be a useful and efficient tool to give a global and integrated vision on the time series treatment through the application of Data Mining based on ARIMA models. Introducing this script has made it possible to group all the most relevant information related to the series and prediction models characteristics in order to be able to optimise decision-making in research, in the sense of obtaining more robust and reliable results to support the study.</p></sec><sec id="s4"><title>Acknowledgements</title><p>We thank Sonia P&#225;ez-Mej&#237;as for the edition of the manuscript in English. We also wish to acknowledge Miguel &#193;ngel Rozal&#233;n Soriano for the constructive comments and suggestions about Big Data and Data Mining. This study has been submitted to the V International Symposium on Marine Sciences (July, 2016). The authors are grateful to anonymous referees for their helpful comments and CACYTMAR (Centro Andaluz de Ciencia y Tecnolog&#237;a Marinas) for funding support.</p></sec><sec id="s5"><title>Cite this paper</title><p>V&#237;ctor Sanz-Fern&#225;ndez,Rub&#233;n Mu&#241;oz-Lechuga,Antonio S&#225;nchez-Navas,Ivone A. Czerwinski,Remedios Cabrera, (2016) Development of a Modelling Script of Time Series Suitable for Data Mining. Open Journal of Statistics,06,555-564. doi: 10.4236/ojs.2016.64047</p></sec></body><back><ref-list><title>References</title><ref id="scirp.68871-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">IBM (2015). www-01.ibm.com/software/data/bigdata/what-is-big-data.html</mixed-citation></ref><ref id="scirp.68871-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Einav, L. and Levin, J. (2014) Economics in the Age of Big Data. Science, 346, 715-721.  
http://dx.doi.org/10.1126/science.1243089</mixed-citation></ref><ref id="scirp.68871-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Lazer, D., Kennedy, R., King, G. and Vespignani, A. (2014) The Parable of Google Flu: Traps in Big Data Analysis. Science, 343, 1203-1205. http://dx.doi.org/10.1126/science.1248506</mixed-citation></ref><ref id="scirp.68871-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Fan, C., Xiao, F., Madsen, H. and Wang, D. (2015) Temporal Knowledge Discovery in Big BAS Data for Building Energy Management. Energy and Buildings, 109, 75-89. http://dx.doi.org/10.1016/j.enbuild.2015.09.060</mixed-citation></ref><ref id="scirp.68871-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Vera-Baquero, A., Colomo-Palacios, R. and Molloy, O. (2016) Real-Time Business Activity Monitoring and Analysis of Process Performance on Big-Data Domains. Telematics and Informatics, 33, 793-807.  
http://dx.doi.org/10.1016/j.tele.2015.12.005</mixed-citation></ref><ref id="scirp.68871-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Krishnan, K. (2013) Data Warehousing in the Age of Big Data. Newnes, Boston.</mixed-citation></ref><ref id="scirp.68871-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Inmon, W.H. and Linstedt, D. (2015) Data Architecture: A Primer for the Data Scientist. Morgan Kaufmann, Boston.</mixed-citation></ref><ref id="scirp.68871-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Rathod, R.R. and Garg, R.D. (2016) Regional Electricity Consumption Analysis for Consumers Using Data Mining Techniques and Consumer Meter Reading Data. Electrical Power and Energy Systems, 78, 368-374.  
http://dx.doi.org/10.1016/j.ijepes.2015.11.110</mixed-citation></ref><ref id="scirp.68871-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, Z., Kusiak, A., Zeng, Y. and Wei, X. (2016) Modeling and Optimization of a Wastewater Pumping System with Data-Mining Methods. Applied Energy, 164, 303-311. http://dx.doi.org/10.1016/j.apenergy.2015.11.061</mixed-citation></ref><ref id="scirp.68871-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Shaheen, M. and Khan, M.Z. (2016) A Method of Data Mining for Selection for Wind Turbines. Renewable and Sustainable Energy Reviews, 55, 1225-1233. http://dx.doi.org/10.1016/j.rser.2015.04.015</mixed-citation></ref><ref id="scirp.68871-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Box, G.E.P. and Jenkins, G.M. (1976) Time Series Analysis, Forecasting and Control. Holden-Day, San Francisco.</mixed-citation></ref><ref id="scirp.68871-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Batarseh, F.A. and Latif, E.A. (2015) Assessing the Quality of Service Using Big Data Analytics: With Application to Healthcare. Big Data Research, 4, 13-24. http://dx.doi.org/10.1016/j.bdr.2015.10.001</mixed-citation></ref><ref id="scirp.68871-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Legates, M.J. (1999) Evaluating the Use of Goodness of Fit Measures in Hydrologic and Hydroclimatic Model Validation. Water Resources Research, 35, 233-241. http://dx.doi.org/10.1029/1998WR900018</mixed-citation></ref><ref id="scirp.68871-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Abrahart, R.J. and See, L. (2000) Comparing Neural Network and Autoregressive Moving Average Techniques for the Provision of Continuous River Flow Forecasts in Two Contrasting Catchments. Hydrological Processes, 14, 2157-2172. http://dx.doi.org/10.1002/1099-1085(20000815/30)14:11/12&lt;2157::AID-HYP57&gt;3.0.CO;2-S</mixed-citation></ref><ref id="scirp.68871-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">R Documentation (2016) ARIMA Modelling of Time Series.  
https://stat.ethz.ch/R-manual/R-devel/library/stats/html/arima.html</mixed-citation></ref><ref id="scirp.68871-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Dickey, D.A. and Fuller, W.A. (1979) Distribution of the Estimators for Autoregressive Time Series with a Unit Root. Journal of the American Statistical Association, 74, 427-431.</mixed-citation></ref><ref id="scirp.68871-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Kwiatkowski, D., Phillips, P.C.B., Schmidt, P. and Shinb, Y. (1992) Testing the Null Hypothesis of Stationary against the Alternative of a Unit Root. Journal of Econometrics, 54, 159-178.  
http://dx.doi.org/10.1016/0304-4076(92)90104-Y</mixed-citation></ref><ref id="scirp.68871-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Breusch, T.S. and Pagan, A.R. (1979) A Simple Test for Heteroscedasticity and Random Coefficient Variation. Econometrica, 47, 1287-1294. http://dx.doi.org/10.2307/1911963</mixed-citation></ref><ref id="scirp.68871-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Ljung, G.M. and Box, G.E.P. (1978) On a Measure of Lack of Fit in Time Series Models. Biometrika, 65, 297-303. 
http://dx.doi.org/10.1093/biomet/65.2.297</mixed-citation></ref><ref id="scirp.68871-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Chatfield, C. (2013) The Analysis of Time Series: An Introduction. CRC Press, Boca Raton.</mixed-citation></ref><ref id="scirp.68871-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">Parreno, J., De la Fuente, D., Gómez, A. and Fernández, I. (2003) Previsión en el sector turístico en Espana con las metodologías Box-Jenkins y Redes neuronales. XIII Congreso Nacional ACEDE, Salamanca, Espana.</mixed-citation></ref><ref id="scirp.68871-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">Holton, J. and Keating, B. (1996) Previsiones en los negocios. Irwin, Madrid.</mixed-citation></ref><ref id="scirp.68871-ref23"><label>23</label><mixed-citation publication-type="other" xlink:type="simple">Steel, R.G.D. and Torrie, J.H. (1960) Principles and Procedures of Statistics with Special Reference to the Biological Sciences. McGraw Hill, New York, 187-287.</mixed-citation></ref><ref id="scirp.68871-ref24"><label>24</label><mixed-citation publication-type="other" xlink:type="simple">Ventura, S., Silva, M., Pérez-Bendito, D. and Hervas, C. (1995) Artificial Neural Networks for Estimation of Kinetic Analytical Parameters. Analytical Chemistry, 67, 1521-1525. http://dx.doi.org/10.1021/ac00105a007</mixed-citation></ref><ref id="scirp.68871-ref25"><label>25</label><mixed-citation publication-type="other" xlink:type="simple">Nash, J.E. and Sutcliffe, J.V. (1970) River Flow Forecasting through Conceptual Models Part I-A Discussion of Principles. Journal of Hydrology, 10, 282-290. http://dx.doi.org/10.1016/0022-1694(70)90255-6</mixed-citation></ref><ref id="scirp.68871-ref26"><label>26</label><mixed-citation publication-type="other" xlink:type="simple">Kitanidis, P.K. and Bras, R.L. (1980) Real-Time Forecasting with a Conceptual Hydrologic Model: 2. Applications and Results. Water Resources Research, 16, 1034-1044. http://dx.doi.org/10.1029/WR016i006p01034</mixed-citation></ref><ref id="scirp.68871-ref27"><label>27</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Grinó</surname><given-names> R. </given-names></name>,<etal>et al</etal>. (<year>1992</year>)<article-title>Neural Networks for Univariate Time Series Forecasting and Their Application to Water Demand Prediction</article-title><source> Neural Network World</source><volume> 2</volume>,<fpage> 437</fpage>-<lpage>450</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.68871-ref28"><label>28</label><mixed-citation publication-type="other" xlink:type="simple">Akaike, H. (1974) A New Look at the Statistical Identification Model. IEEE Transactions on Automatic Control, 19, 716-723. http://dx.doi.org/10.1109/TAC.1974.1100705</mixed-citation></ref><ref id="scirp.68871-ref29"><label>29</label><mixed-citation publication-type="other" xlink:type="simple">Motulsky, H.J. and Christopoulos, A. (2003) Fitting Models to Biological Data Using Linear and Nonlinear Regression. GraphPad Software Inc., San Diego, 351 p.</mixed-citation></ref><ref id="scirp.68871-ref30"><label>30</label><mixed-citation publication-type="other" xlink:type="simple">Diebold, F. (1999) Elementos de Pronósticos. International Thomson Editores, México, 106-128 p.</mixed-citation></ref><ref id="scirp.68871-ref31"><label>31</label><mixed-citation publication-type="other" xlink:type="simple">Giraldo Gómez, N.D. (2006) Series de Tiempo con R. Universidad Nacional de Colombia, Colombia.</mixed-citation></ref><ref id="scirp.68871-ref32"><label>32</label><mixed-citation publication-type="other" xlink:type="simple">Gaona, B. (2005) Matrices de covarianza estructuradas en modelos con medidas repericas. Tesis de maestría, Mayagüez, Puerto Rico.</mixed-citation></ref><ref id="scirp.68871-ref33"><label>33</label><mixed-citation publication-type="other" xlink:type="simple">Guyet, T. and Nicolas, H. (2016) Long Term Analysis of Time Series of Satellite Images. Pattern Recognition Letters, 70, 17-23. http://dx.doi.org/10.1016/j.patrec.2015.11.005</mixed-citation></ref><ref id="scirp.68871-ref34"><label>34</label><mixed-citation publication-type="other" xlink:type="simple">Siluyele, I. and Jere, S. (2016) Using Box-Jenkins Models to Forecast Mobile Cellular Subscription. Open Journal of Statistics, 6, 303-309. http://dx.doi.org/10.4236/ojs.2016.62026</mixed-citation></ref><ref id="scirp.68871-ref35"><label>35</label><mixed-citation publication-type="other" xlink:type="simple">Czerwinski, I.A., Gutiérrez-Estrada, J.C. and Hernando-Casal, J.A. (2007) Short-Term Forecasting of Halibut CPUE: Linear and Non-Linear Univariate Approaches. Fisheries Research, 86, 120-128. 
http://dx.doi.org/10.1016/j.fishres.2007.05.006</mixed-citation></ref><ref id="scirp.68871-ref36"><label>36</label><mixed-citation publication-type="other" xlink:type="simple">Jere, S. and Moyo, E. (2016) Modelling Epidemiological Data Using Box-Jenkins Procedure. Open Journal of Statistics, 6, 295-302. http://dx.doi.org/10.4236/ojs.2016.62025</mixed-citation></ref><ref id="scirp.68871-ref37"><label>37</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Arnau</surname><given-names> J. </given-names></name>,<etal>et al</etal>. (<year>1981</year>)<article-title>Uso de los modelos de series temporales como técnica de análisis de los dise?os conductuales</article-title><source> Anuario de psicología</source><volume> 25</volume>,<fpage> 20</fpage>-<lpage>34</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.68871-ref38"><label>38</label><mixed-citation publication-type="other" xlink:type="simple">Maté Jiménez, C. (2014) Big data.Un nuevo paradigma de análisis de datos. Anales de mecánica y electricidad, 10-16.</mixed-citation></ref></ref-list></back></article>