Friday, July 26, 2019

Statistical computation of maximum likelihood estimates using R Math Problem

Statistical computation of maximum likelihood estimates using R - Math Problem Example SMA do not account for seasonal changes. The duration of the moving average can best be determined according to the type of application data to forecast. Long time periods gives smoother response by removing random variations but react slower to changes in the data as it lags the trend. Short time periods produce more oscillation but closely follow the trend. SMA is calculated by averaging the most recent number of actual values. SMA is calculated by using the following equation (Chase & Jacobs 2006): Where Ft Forecast for coming period At-1 Actual value in the past At-2, At-3, Actual values two, three, periods ago. N Number of periods to be averaged In the attached excel document, SMA is calculated for three periods: three, four, and five. Different n time periods will produce different results of data values. The values of MAD corresponding to each period are shown in the following table: Table 1: MAD values for different periods of SMA Time Period (n) MAD 3 4.36 4 3.10 5 3.95 Table one demonstrates that the smallest value of MAD exists for the period of n=4. This indicates that the type of data being analyzed is best estimated using a period of four. Figure 1: SMA for periods of 3,4, and 5. Figure one confirms the results of MAD analysis from table one. The best fit trend line is the SMA for n=4. This line follows the actual data curve specially on the 15th, 22, and 25 where major change occurred in wind speed. The period that best fits the actual data is dependent on the type of data analyzed which is the wind speed. Weighted Simple Moving Average (WSMA): A weighted moving average puts different weights to each element, providing that the sum of all weights equals 1. Weights are...Short time periods produce more oscillation but closely follow the trend. In the attached excel document, SMA is calculated for three periods: three, four, and five. Different n time periods will produce different results of data values. The values of MAD corresponding to each period are shown in the following table: Figure one confirms the results of MAD analysis from table one. The best fit trend line is the SMA for n=4. This line follows the actual data curve specially on the 15th, 22, and 25 where major change occurred in wind speed. The period that best fits the actual data is dependent on the type of data analyzed which is the wind speed. A weighted moving average puts different weights to each element, providing that the sum of all weights equals 1. Weights are chosen by experience and trial and error. A general rule applies that recent past is more indicative of the future and should get higher weighting. However, if the data are seasonal weights should be established accordingly. The weighted moving average advantage over the simple moving average is the ability to vary the effects of past data. In the excel document, in the Weighted SMA sheet, the weights of the moving average are determined by trial and error to produce the least value of MAD since there is no expert opinion as to guide the setup of

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.