# Data.txt contain figures giving monthly U.S. air revenue passenger ...

## Question

Data.txt contain figures giving monthly U.S. air revenue passenger miles, in millions, for the period January 2002 through May 2017. These files include the air revenue passenger miles data, the logged air revenue passenger miles data, the log return air revenue passenger miles data, and various dummy variables.

1. Plot the air revenue passenger miles time series. Comment on the appearance of the plot. Are there any notable features? Then do the same for the logged air revenue passenger miles time series. Compare the features of the two plots.

2.   For the air revenue passenger miles data, fit an additive model with a polynomial trend (degree at least three), a seasonal component using the month variable, and the calendar trigonometric pairs. If you find insignificant variables, remove them and refit. Comment on and interpret the statistical results.

(a) Tabulate and plot the estimated seasonal indices and interpret them in the context of the data collection.

(b) Save the residuals from the fit. Form a normal quantile plot of these residuals, and plot them vs. time and form their autocorrelations. Describe the results. What conclusions do you draw?

(c) Perform the fit again with the cosine and sine dummies, instead of the month variable, for the seasonal component. Remove any cosine-sine pairs (and perhaps c6 also) which are not significant. For those which remain, perform the amplitude and phase calculations and interpret the results.

3. Using the logged air revenue passenger miles data, fit a multiplicative model with the same explanatory variables as in part 2. Remove insignificant variables and refit. Give a brief description of what the fitted model indicates. Perform (a) and (b) of part 2.

4.   Fit a model to the log return data (the differenced logged air revenue passenger miles values) using the month variable and the calendar trigonometric pairs (the latter if needed). Verify that no trend estimation is necessary. Briefly describe the fitted model.

(a) From the result, construct estimates of the seasonal indices (not the differenced indices). Discuss briefly.

(b) Save the residuals from the fit. Form a normal quantile plot of these residuals, and plot them vs. time and form their autocorrelations. Describe the results. What conclusions do you draw?
5. Compare and discuss the three model fits using the air revenue passenger miles data, the logged data, and the log return data. (i) How do the seasonal index estimates for the latter two fits compare? (ii) Comment on the implications of the residual diagnostics for the three fits. (iii) Does it appear that the models have adequately estimated the seasonal structure? Explain.

JMP hints

In 1, use Graph/Overlay Plot and connect the points.

Use the red button in the upper left corner to access Estimates/Custom Test (use two columns) to perform a partial F test for the significance of a trigonometric pair.

Use Analyze/Modeling/Time Series to produce a time series plot of the residuals and the residual autocorrelations.

R hints

To fit a polynomial in time, use as independent variables powers of time. For example, to fit a fourth-degree polynomial, include for explanatory variables in the lm command

time + I(time^2) + I(time^3) + I(time^4)

As an alternative, you can use

poly(time,4)

These two approaches give identical overall fits, but produce different coefficient estimates. The latter employs orthogonal polynomials, and the former does not. Either form can be used for this assignment.

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

Air Passanger Analysis
library(mgcv)
library(stats)

# Looking at the structure of the data
str(AirData)
## 'data.frame':    185 obs. of 10 variables:
## \$ Year               : int 2002 2002 2002 2002 2002 2002 2002 2002 2002 2002 ...
## \$ Month             : int 1 2 3 4 5 6 7 8 9 10 ...
## \$ Time               : int 1 2 3 4 5 6 7 8 9 10 ...
## \$ AirRevPassMiles    : num 46588 45158 57423 53013 55664 ...
## \$ logAirRevPassMiles : num 10.7 10.7 11 10.9 10.9 ...
## \$ dlogAirRevPassMiles: num NA -0.0312 0.2403 -0.0799 0.0488 ...
## \$ c348               : num -0.309 0.9549 -0.794 -0.0377 0.8375 ...
## \$ s348               : num -0.951 0.297 0.608 -0.999 0.546 ...
## \$ c432               : num 0.309 0.113 -0.514 0.824 -0.985 ...
## \$ s432               : num -0.951 0.994 -0.858 0.567 -0.175 ...
# 1. Plot the air revenue passenger miles time series. Comment on the appearance of the plot. Are there any notable features? Then do the same for the logged air revenue passenger miles time series. Compare the features of the two plots.
plot(AirData\$Time,AirData\$AirRevPassMiles,type="l",xlab="TIme",ylab="Air Revenue",main="Air Revenue over TIme")...

By purchasing this solution you'll be able to access the following files:
Solution.docx and Solution.R.

\$40.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Statistics-R Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.