• No results found

While grey models can take a variety of forms the generic grey model is defined by the term GM(k,N) where k represents the number of differential terms and N the number of variables used to predict subsequent values in the sequence. In the case of LTC we are interested in the GM(1,1) model as, given the short planning period under investigation, we do not explicitly model the impact of factors other than time and at the same time we want to explore the grey model’s ability using routinely collected activity data . Furthermore, choosing a value of k=1 implies that we are interested in mapping the behaviour of the demand process from one period to the next using only the information gathered in the previous period.

The formulation of the GM(1,1) begins by firstly creating a vector representing the grey variable 𝑋𝑋1 from the original sequence of data which is contained within the vector 𝑋𝑋0. Formally, the initial sequence of observations, in this case our LTC activity data per monthly period is represented by the vector 𝑋𝑋0 and is constructed as shown in (7.1) (Kayacan, Ulutas and Kaynak 2010). Here n denotes the number of observations available and in our LTC corresponds with the value 48 as we use the recorded number of LTC packages taking place between the 1st of April 2005 and the 31st of March 2009.

𝑋𝑋0 = {π‘₯π‘₯0(1), π‘₯π‘₯0(2), … , π‘₯π‘₯0(𝑝𝑝)} (7.1)

The initial observations are then transformed by means of an Accumulated Generating Operation (AGO) to generate our grey variable 𝑋𝑋1, a monotonically increasing sequence, subject to no non-negative observations, where 𝑋𝑋1 is defined as the 1st AGO of 𝑋𝑋0 as shown in (7.2). The requirements of the AGO are such that no observations can be negative but since LTC activity within a care group and intensity level must be greater than or equal to zero this assumption is satisfied. The intuition for the AGO is to provide sufficient

pre-7.3. The GM (1,1) model 165

processing so as to be able to add additional regularity to the underlying data sequence and amplify hidden data patterns.

We define a new vector 𝑍𝑍1 which represents the average value of two adjacent neighbours in the AGO vector 𝑋𝑋1 created previously (7.3). In the context of grey theory it is often referred to as the background vector. Intuitively, the vector 𝑍𝑍1 is created to transform our discrete AGO sequence into a smooth continuous one since at any incremental interval [t ,t+h] where 0 < h < 1 the value for π‘₯π‘₯1(𝑑𝑑 + β„Ž) will lie somewhere between π‘₯π‘₯1(𝑑𝑑) and π‘₯π‘₯1(𝑑𝑑 + 1).

𝑍𝑍1(π‘˜π‘˜) = 0.5 Γ— [π‘₯π‘₯1(π‘˜π‘˜) + π‘₯π‘₯1(π‘˜π‘˜ βˆ’ 1)]

(π‘˜π‘˜ = 2, … , 𝑁𝑁) (7.3)

Formally, the derivative of the AGO with respect to time can be approximated as shown in (7.4) under the assumption that the interval between consecutive periods is 1 period (Bingyun and Malin 2009). The general convention is however to take the average of two successive periods in the AGO, as shown by the creation of 𝑍𝑍1 in (7.3), so as to have a

7.3. The GM (1,1) model 166

The GM(1,1) is defined as a difference equation (7.6) of the vectors 𝑍𝑍1, the steady state values of the AGO, and 𝑋𝑋0, the original series (Deng 1988). The variables a and b are known as the development coefficient and the driving coefficient respectively. Their role is to control the mapping of the AGO sequence to observed data points. As a result, in order to use the grey model to make predictions both such variables need to be determined.

π‘₯π‘₯0(π‘˜π‘˜)+ π‘Žπ‘Žπ‘§π‘§1(π‘˜π‘˜) = 𝑏𝑏

(π‘˜π‘˜ = 1, … , 𝑁𝑁) (7.5)

Equation (7.6) is the first-order differential equation based on the grey model in (7.5). In the context of grey theory it is known as the shadow equation for the GM(1,1) model.

Δ𝑋𝑋1(𝑑𝑑)

Δ𝑑𝑑 + π‘Žπ‘Žπ‘‹π‘‹1(𝑑𝑑) = 𝑏𝑏 (7.6)

For values of k >= 2 we can rearrange and rewrite (7.5) in matrix form using the input data set 𝑋𝑋0 and values from the background vector 𝑍𝑍1 to obtain (7.7):

οΏ½ π‘₯π‘₯0(2) π‘₯π‘₯0(3) π‘₯π‘₯0…(𝑝𝑝)

οΏ½ = οΏ½

βˆ’π‘§π‘§1(2), 1

βˆ’π‘§π‘§1(3), 1

βˆ’π‘§π‘§1(𝑝𝑝),… 1οΏ½ Γ— οΏ½π‘Žπ‘Žπ‘π‘οΏ½ (7.7)

By the least squares method the grey coefficients π‘Žπ‘Ž and 𝑏𝑏 can be estimated (7.8) :

οΏ½π‘Žπ‘Žπ‘π‘οΏ½ = (𝐡𝐡𝑇𝑇𝐡𝐡)βˆ’1π΅π΅π‘‡π‘‡π‘Œπ‘Œπ‘šπ‘š (7.8)

7.3. The GM (1,1) model 167

π‘€π‘€β„Žπ‘’π‘’π‘Ÿπ‘Ÿπ‘’π‘’ π‘Œπ‘Œ = οΏ½ π‘₯π‘₯0(2) π‘₯π‘₯0(3) π‘₯π‘₯0…(𝑝𝑝)

� , 𝐡𝐡 = �

βˆ’π‘§π‘§1(2), 1

βˆ’π‘§π‘§1(3), 1

βˆ’π‘§π‘§1(𝑝𝑝),… 1

οΏ½

In substituting coefficients a and b identified using least squares into (7.6), the approximate relationship between the next value in the AGO and the initial value in the original dataset can be found (7.9)

π‘₯π‘₯οΏ½1(𝑑𝑑 + 1) = οΏ½π‘₯π‘₯0(1)βˆ’ π‘π‘π‘Žπ‘ŽοΏ½ π‘’π‘’βˆ’π‘ π‘ π‘‘π‘‘+ π‘π‘π‘Žπ‘Ž (7.9)

While equation (7.9) represents the predicted value of the AGO sequence at time (𝑑𝑑 + 1),

π‘₯π‘₯οΏ½1(𝑑𝑑 + 1), an inversed accumulated generating operation (IAGO) is required to remap the predicted AGO value back to the original input data. This can be achieved using equation (7.10) where π‘₯π‘₯οΏ½0(𝑑𝑑) is the predicted value in the original series at time t and π‘₯π‘₯οΏ½1(𝑑𝑑) is the predicted value in the AGO at time t.

π‘₯π‘₯οΏ½0(𝑑𝑑 + 1) = π‘₯π‘₯οΏ½1(𝑑𝑑 + 1) βˆ’ π‘₯π‘₯οΏ½1(𝑑𝑑) (7.10)

Furthermore, the complete set of predicted values of the original sequence can be represented by the vector 𝑋𝑋�0, namely:

𝑋𝑋�0= {π‘₯π‘₯οΏ½0(1), π‘₯π‘₯οΏ½0(2), … , π‘₯π‘₯οΏ½0(𝑝𝑝)} (7.11)

7.3.1 Application to the London LTC dataset

Our objective is to investigate the suitability and accuracy of a grey inspired methodology to project LTC demand and cost at the local level. Specifically we want to evaluate the

7.3. The GM (1,1) model 168

ability of a GM(1,1) model built solely on routinely available activity data to deliver reliable projections for the purposes of short to medium planning

Data

In order to develop a grey model for the London LTC data set we used data on recorded activity in London between the 1st of April 2005 and the 31st of March 200935. Rather than model the number of individuals in LTC, we focus on the number of packages taking place by considering the number of days in care during each monthly period. For each monthly period, for which there are 48 in our dataset, we identify all care packages taking place by considering the start date and end dates of care for each individual. Once we have identified the individuals concerned we estimate the length of time in care during each period to calculate the number of care days. The number of care days is then summed over all individuals and divided by the number of days in a period to estimate the number of packages taking place.

The benefit of using the care days approach relates to its ease of calculation and how it can be more closely mapped to the total cost of care during a period. The weaknesses however it that it has a general tendency to understate the number of people in care since, for example, 10 individuals each receiving 3 days in care during a period would be reported as one care package taking place. Based on this metric, the number of care packages taking place in London during the data period across each of the six care groups and for both provision types (HC = home care, PL= institutional placement) is shown in Figure 7.1. In particular, we observe that while the total number of packages taking place has increased this is largely explained by the growth in the number of physically frail care packages and the number of organic mental health care packages taking place in institutions.

35 Details of the data collection process can be found in Β§4.4

7.3. The GM (1,1) model 169

Figure 7.1– No. of care packages taking place between April 2005 and March 2009 in London.

Figure 7.2 presents the number of care packages taking place over time when the activity is group by those taking place in care homes and those taking place in institutions (placements). We observe that over time both activity types are increasing although over the period the proportion of activity that takes place in institutions has fallen by 6% from 86% in April 2005 to 80% in March 2009. In terms of the absolute numbers, the number of care packages taking place in the home has risen from just over 110 cases in the starting period to 496 by March 2009: an increase of approximately 450%.

7.3. The GM (1,1) model 170

Figure 7.2– Proportion of home care and institutional placements taking place during April 2005 and March 2009 in London.

To test the time series for stationarity we performed36 both the augmented dickey-fuller (ADF)37 and the Kwiatkowski–Phillips–Schmidt–Shin (KPSS)38 tests. Under the ADF test that null hypothesis is there exists a unit root such that shocks to the time series have permanent effects, whilst the KPSS tests the null hypothesis is that an observable time series is stationary, in the sense that the joint probability distribution does not change when shifted in time, around a deterministic trend.

From Figure 7.3 do not find enough evidence to reject the null hypothesis of the ADF at the 5% level of significance and from Figure 7.4 we find sufficient evidence to reject the null hypothesis of trend stationarity. In this case, both tests would tend to support that the number of care packages taking place per time period is not stationary and hence any

36 Both statistical tests are performed within the R statistical environment (www.r-project.org)

37 See (Hatanaka 1996) for details

38 See (Kwiatkowski, et al. 1992) for details

7.3. The GM (1,1) model 171

ordinary least squares (OLS) autoregressive model developed to make predictions of LTC demand could lead to unreliable parameter estimates.

Figure 7.3– ADF test for total number of packages taking place during April 2005 and March 2009 in London.

Figure 7.4– KPSS test for total number of packages taking place during April 2005 and March 2009 in London.

To test the amount of differencing required to induce stationarity in the number of packages taking place over time we performed one level of differencing using the R statistical environment and repeated the ADF and KPSS tests of stationarity. Figure 7.5 shows how with one level of differencing the upward trend in activity seen previously is almost completely removed and the mean and variance of the series appear more stable.

From Figure 7.6 the revised KPSS test shows that there is now significant evidence to support that the time series is now stationary at the 5% level, whilst the ADF test result has become less significant there remains sufficient evidence to support that the series continues to be non-stationary at the 5% level of significance. In particular, the ADF appears sensitive to the large fluctuations in activity during late 2007.

7.3. The GM (1,1) model 172

Figure 7.5– Plot of 1st difference in packages taking place during April 2005 and March 2009 in London.

Figure 7.6– ADF and KPSS test for 1st difference of packages taking place during April 2005 and March 2009 in London.

To check for the presence of seasonality in the dataset we examined the autocorrelation and partial autocorrelation functions for the time series with one level of differencing for the total activity, home care activity and placement activity. The ACF function represents the tendency of lagged values of a series to be correlated with its current value, whilst the PACT function works in the same way it controls for the effect of any intervening lags. The

7.3. The GM (1,1) model 173

resulting ACF and PACF plots for total activity are shown in Figure 7.7 and Figure 7.8.

From the ACF and PACF we find that there are no significant lags in terms of moving average or autocorrelation terms at the 95% level of significance (represented by the dotted lines). Furthermore, the seasonal lags, at periods 12 are not significant and hence there is little evidence of monthly seasonality39.

Figure 7.7– ACF for 1st difference of packages taking place during April 2005 and March 2009 in London.

In addition to the total number of packages taking place we also considered the PACF and ACF for the number of packages taking place at home and in institutional settings. As was the case for the total number of packages we did not find any evidence of seasonality.

39 Although not presented here the same results were found for the ACF and PACF for home care activity and placement activity when plotted individually.

7.3. The GM (1,1) model 174

Figure 7.8– PACF for 1st difference of packages taking place during April 2005 and March 2009 in London.

Formulation of the grey model in Microsoft Excel

To develop the grey model for LTC activity we used Microsoft Excel 2007 and adapted the equations (7.1) to (7.10) into the relevant Microsoft Excel formula. Table 7-1 provides an example of the resulting AGO and Z vector for the first 10 periods in our dataset. Recall that the AGO function can be calculated by summing the activity in a period k with the total sum of activity from 1 to k-1. Our background vector Z for a period k is the average of two advanced AGO values for k and k-1. The vector Z starts at k=2 since it is only defined for periods k>=2. Figure 7.9 provides a graphical overview of the three input vectors in our 10 period example.

7.3. The GM (1,1) model 175

Table 7-1 – Example of the initial grey data mapping functions

k Period

Total Activity

(𝑋𝑋0)

AGO

(𝑋𝑋1) π’π’πŸπŸ

1 01/04/2005 773 773

2 01/05/2005 819 1592 1182.5

3 01/06/2005 863 2455 2023.5

4 01/07/2005 909 3364 2909.5

5 01/08/2005 913 4277 3820.5

6 01/09/2005 936 5213 4745

7 01/10/2005 957 6170 5691.5

8 01/11/2005 982 7152 6661

9 01/12/2005 999 8151 7651.5

10 01/01/2006 1021 9172 8661.5

Figure 7.9– Graphical plot of the activity, AGO and Z values.

7.3. The GM (1,1) model 176

Minimising sum of squares

The grey model is solved for parameters a and b by the least squares method minimising the total squared errors in the AGO sequence as shown in (7.12). Depending on the assumption surrounding the relationship between the parameters in the grey model with the dependant variable the values a and b can be found using ordinary least squares (OLS), in the case that the model is assumed to be linear in the parameters, or a more general non-linear least squares approach in which the non-linear assumption is not necessary.

𝑇𝑇𝑇𝑇𝑆𝑆 = οΏ½οΏ½π‘₯π‘₯οΏ½1(𝑑𝑑) βˆ’ π‘₯π‘₯1(𝑑𝑑)οΏ½2

𝑁𝑁 𝑑𝑑=2

(7.12)

7.3.2 Results

Table 7-2 provides an overview of our results after fitting the grey models to the different types of LTC activity and under two different solver approaches. The columns a and b represent the grey parameters estimates by the solver whereas the columns RMSE and MAPE represent the root mean squared error (RMSE) and mean absolute percentage error (MAPE) recorded for each resulting model.

Both the RMSE and MAPE are standard ways to record the diagnostic performance of forecasting models, with the RMSE being based on the square root of the total sum of squared errors and the MAPE being based on the average absolute percentage difference between each observed value and its corresponding predicted value. In both cases lower values of RMSE and MAPE indicate more favourable performance, with the RMSE penalising models that make even a small number of very large forecast errors.