Time Series Analysis

Submitted by: Submitted by

Views: 59

Words: 1818

Pages: 8

Category: Science and Technology

Date Submitted: 10/04/2014 09:01 AM

Report This Essay

WEEK 1

EXERCISE 1

ANTONELLO CIRULLI AND ALESSIO PODDA

1. Point a) Firstly, we load the time series from the file “class.Rdata” using the command > load ( " class . Rdata " ) Afterwords, we fit a global cubic trend as follows: >t tt cubfit cubfitts cubfitts plot ( us . gnp , main = " Global Quadratic Trend " , xlab = " Time " , ylab = " Tens of Billions of Dollars " , c o l = " black " ) > lines ( cubfitts , c o l = " red " ) > legend ( ’ topleft ’ , c ( " U . S . GNP " ," Global Quadratic Trend " ) , c o l = c ( " black " ," red " ) , lty =1 , bty = ’n ’ , cex =.75) We want to check whether the global cubic trend is significantly better than the global quadratic one or not. To do so we use the command > summary ( cubfit ) obtaining the following output: Call : lm ( formula = us . gnp ∼ poly (t , 3 , raw = TRUE ) ) Residuals : Min 1Q -29.837 -15.119

Median -1.746

3Q 10.640

Max 44.058

Coefficients : (1 not defined because of singularities ) Estimate Std . Error t value Pr ( >| t |) ( Intercept ) 2.435 e +06 2.487 e +05 9.788 3.67 e -15 * * * poly (t , 3 , raw = TRUE ) 1 -2.512 e +03 2.542 e +02 -9.883 2.42 e -15 * * *

Date: September 24, 2014.

1

2

ANTONELLO CIRULLI AND ALESSIO PODDA

Global Quadratic Trend

U.S. GNP Global Quadratic Trend

Tens of Billions of Dollars

300

400

500

600

700

1950

1955 Time

1960

1965

Figure 1 poly (t , 3 , raw = TRUE ) 2 6.482 e -01 6.496 e -02 9.979 1.58 e -15 * * * >> poly (t , 3 , raw = TRUE ) 3 NA NA NA NA --Signif . codes : 0 * * * 0.001 * * 0.01 * 0.05 . 0.1 1 Residual standard error : 17.31 on 77 degrees of freedom Multiple R - squared : 0.986 , Adjusted R - squared : 0.9857 F - statistic : 2721 on 2 and 77 DF , p - value : < 2.2 e -16 From the line indicated by the symbol >> in the above output, we deduce that the cubic curve that better fits our data is degenerate. In particular, this means that, in our case, fitting a global cubic trend is equivalent to fitting the...