You are on page 1of 3

Call:

tslm(formula = First_diff ~ trend + season)

Residuals:
Min 1Q Median 3Q Max
-1.7612 -0.3145 -0.1256 0.2644 1.6085

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.954249 0.239846 3.979 0.000244 ***
trend 0.015697 0.006006 2.614 0.012070 *
season2 -1.694243 0.252521 -6.709 2.49e-08 ***
season3 -1.308283 0.252449 -5.182 4.76e-06 ***
season4 -0.534397 0.252521 -2.116 0.039765 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.6306 on 46 degrees of freedom


Multiple R-squared: 0.5777, Adjusted R-squared: 0.5409
F-statistic: 15.73 on 4 and 46 DF, p-value: 3.508e-08

This is the result of a linear regression model that was run in RStudio. The model
includes the variables 'First_diff', 'trend', and 'season'.

The 'Call' section shows the function call used to run the model, which includes
the formula used to define the relationship between the variables.

The 'Residuals' section displays the summary statistics for the residuals of the
model, which are the differences between the predicted values and the actual
values.

The 'Coefficients' section shows the estimated coefficients for each of the
predictor variables in the model. The 'Estimate' column shows the estimated values
of the coefficients, the 'Std. Error' column shows the standard errors of the
estimates, the 't value' column shows the t-statistics for the hypothesis test that
the coefficient is equal to zero, and the 'Pr(>|t|)' column shows the corresponding
p-values. The asterisks in the 'Signif. codes' column indicate the level of
statistical significance of the coefficients.

The 'Residual standard error' is an estimate of the standard deviation of the


residuals, and the 'Multiple R-squared' and 'Adjusted R-squared' are measures of
how well the model fits the data. The 'F-statistic' and 'p-value' in the last line
of the output indicate the overall significance of the model, with a low p-value
indicating that the model is statistically significant in predicting the response
variable.

In this model, the estimated intercept is 0.954, indicating that the expected value
of the response variable when all predictor variables are zero is 0.954. The
estimated coefficients for 'trend' and 'season' are 0.016 and -1.694, -1.308, and -
0.534, respectively, for each level of 'season'. The p-values for 'trend' and each
level of 'season' are all below 0.05, indicating that they are statistically
significant in predicting 'First_diff'. The R-squared values indicate that the
model explains around 57.77% of the variation in 'First_diff'.

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-------------------------------------------------------------------
fit.cpits2adiff <- tslm(First_diff ~ trend + season)
summary(fit.cpits2diff)

The 'Residuals' section displays the summary statistics for the residuals of the
model, which are the differences between the predicted values and the actual
values.
The 'Coefficients' section shows the estimated coefficients for each of the
predictor variables in the model. The 'Estimate' column shows the estimated values
of the coefficients, the 'Std. Error' column shows the standard errors of the
estimates, the 't value' column shows the t-statistics for the hypothesis test that
the coefficient is equal to zero, and the 'Pr(>|t|)' column shows the corresponding
p-values. The asterisks in the 'Signif. codes' column indicate the level of
statistical significance of the coefficients.
The 'Residual standard error' is an estimate of the standard deviation of the
residuals, and the 'Multiple R-squared' and 'Adjusted R-squared' are measures of
how well the model fits the data. The 'F-statistic' and 'p-value' in the last line
of the output indicate the overall significance of the model, with a low p-value
indicating that the model is statistically significant in predicting the response
variable.
From the above seasonality is still present. we can see that the residual standard
error is 0.6306, which is relatively small, and the multiple R-squared is 0.5777.
The F-statistic for the model is 15.73 with a p-value for trend and season are all
less than 0.05, indicating that they are significant statistically in predicting
‘First_diff’. The R-squared values indicate that the model explains around 57.77%
of the variation in ‘First_diff’.
However, we need to check if the residuals are stationary or not. One way to do
this is to perform an ADF test on the residuals. If the p-value of the test is
lower than the significance level (e.g., 0.05), we can reject the null hypothesis
of non-stationarity and conclude that the residuals are stationary.

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
--------------------------------------------------------------------

fit.cpits2bdiff <- tslm(Second_diff ~ trend + season)


summary(fit.cpits2diff)

Call:
tslm(formula = Second_diff ~ trend + season)

Residuals:
Min 1Q Median 3Q Max
-1.35948 -0.26419 -0.01291 0.42785 1.64014

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.571848 0.252062 2.269 0.0281 *
trend -0.002823 0.006526 -0.433 0.6674
season2 -2.131707 0.271793 -7.843 5.84e-10 ***
season3 -0.099607 0.266438 -0.374 0.7103
season4 0.291140 0.266518 1.092 0.2805
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.6656 on 45 degrees of freedom


Multiple R-squared: 0.6941, Adjusted R-squared: 0.6669
F-statistic: 25.53 on 4 and 45 DF, p-value: 4.415e-11
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
---------------------------

fit.cpits2cdiff <- tslm(Third_diff ~ trend + season)


summary(fit.cpits2diff)
Call:
tslm(formula = Third_diff ~ trend + season)

Residuals:
Min 1Q Median 3Q Max
-2.82214 -0.50298 0.02937 0.50623 2.25995

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.3343133 0.4197434 -0.796 0.430035
trend 0.0008402 0.0112557 0.075 0.940834
season2 -1.8212220 0.4544756 -4.007 0.000234 ***
season3 2.2952331 0.4548936 5.046 8.29e-06 ***
season4 0.7012329 0.4456555 1.573 0.122770
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.113 on 44 degrees of freedom


Multiple R-squared: 0.6583, Adjusted R-squared: 0.6272
F-statistic: 21.19 on 4 and 44 DF, p-value: 8.507e-10
Fourth_diff <- diff(Fourth_diff)
ts.plot(Fourth_diff)

You might also like