Question

In: Computer Science

The data file wages contains monthly values of the average hourly wages (in dol-lars) for workers...

The data file wages contains monthly values of the average hourly wages (in dol-lars) for workers in the U.S. apparel and textile products industry for July 1981 through June 1987.

(a) Display and interpret the time series plot for these data.

(b) Use least squares to fit a linear time trend to this time series. Interpret the regression output. Save the standardized residuals from the fit for further analysis.

(c) Construct and interpret the time series plot of the standardized residuals from part (b).

(d) Use least squares to fit a quadratic time trend to the wages time series. Interpret the regression output. Save the standardized residuals from the fit for further analysis.

(e) Construct and interpret the time series plot of the standardized residuals from part (d).

data file wages

wages
7.75
7.74
7.87
7.89
7.94
8
8.17
8.1
8.13
8.19
8.22
8.25
8.31
8.26
8.33
8.31
8.36
8.42
8.46
8.5
8.47
8.48
8.49
8.49
8.53
8.44
8.52
8.54
8.61
8.67
8.72
8.7
8.73
8.75
8.76
8.77
8.83
8.78
8.85
8.87
8.93
9
9.07
9.07
9.09
9.13
9.13
9.13
9.19
9.12
9.16
9.17
9.23
9.31
9.31
9.33
9.33
9.33
9.34
9.32
9.35
9.27
9.31
9.32
9.37
9.42
9.44
9.44
9.44
9.48
9.45
9.44

Please use R to do it and provide the code

Solutions

Expert Solution

Solution :-

written using R

data(wages)

plot(wages, type='o', ylab='wages per hour')

#linear model

wages.lm = lm(wages~time(wages))

summary(wages.lm) #r square seems perfect

##

## Call:

## lm(formula = wages ~ time(wages))

##

## Residuals:

## Min 1Q Median 3Q Max

## -0.23828 -0.04981 0.01942 0.05845 0.13136

##

## Coefficients:

## Estimate Std. Error t value Pr(>|t|)   

## (Intercept) -5.490e+02 1.115e+01 -49.24 <2e-16 ***

## time(wages) 2.811e-01 5.618e-03 50.03 <2e-16 ***

## ---

## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

##

## Residual standard error: 0.08257 on 70 degrees of freedom

## Multiple R-squared: 0.9728, Adjusted R-squared: 0.9724

## F-statistic: 2503 on 1 and 70 DF, p-value: < 2.2e-16

plot(y=rstandard(wages.lm), x=as.vector(time(wages)), type = 'o')

#Quadratic model trend

wages.qm = lm(wages ~ time(wages) + I(time(wages)^2))

summary(wages.qm)

##

## Call:

## lm(formula = wages ~ time(wages) + I(time(wages)^2))

##

## Residuals:

## Min 1Q Median 3Q Max

## -0.148318 -0.041440 0.001563 0.050089 0.139839

##

## Coefficients:

## Estimate Std. Error t value Pr(>|t|)   

## (Intercept) -8.495e+04 1.019e+04 -8.336 4.87e-12 ***

## time(wages) 8.534e+01 1.027e+01 8.309 5.44e-12 ***

## I(time(wages)^2) -2.143e-02 2.588e-03 -8.282 6.10e-12 ***

## ---

## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

##

## Residual standard error: 0.05889 on 69 degrees of freedom

## Multiple R-squared: 0.9864, Adjusted R-squared: 0.986

## F-statistic: 2494 on 2 and 69 DF, p-value: < 2.2e-16

#time series plot of the standardized residuals

plot(y=rstandard(wages.qm), x=as.vector(time(wages)), type = 'o')


Related Solutions

The file Assign1_Data contains data on the hourly wages (Hourly Wage) of all employees of a...
The file Assign1_Data contains data on the hourly wages (Hourly Wage) of all employees of a grocery chain in the Ottawa region. (a) Treating this set of data as the population, use Minitab to calculate the population mean and the population standard deviation for the Hourly Wage variable. (b) Examine a boxplot and histogram of the population data. Explain if the means of all possible random samples of size 40 from this population would form a normal distribution. (c) Using...
Suppose you have data on average hourly wages of workers in Virginia (X) and Maryland (Y)....
Suppose you have data on average hourly wages of workers in Virginia (X) and Maryland (Y). Suppose that: X = 30; s.d.(X) = 3; NX = 25; Y = 38; s.d.(Y ) = 3.5; NY = 25; Cov(X, Y ) = 0 In each of the following you must clearly outline the 3 steps of hypothesis testing Use 5% as your level of significance. 1 a. Test for the statistical significance of the sample mean for Average Hourly Wage of...
Hourly wages at Manufacturing Plant A very from worker to worker, with an average hourly wage...
Hourly wages at Manufacturing Plant A very from worker to worker, with an average hourly wage of $13.86, and a standard deviation of $2.68 per hour, or σPlantA=2.68. In an attempt to attract new employees, a newly constructed Manufacturing Plant B claims that its employees will be paid, on average, more than than employees at Manufacturing Plant A. Assume that the standard deviation in hourly wages at Plant B is the same as at Plant A, or σPlantB=2.68 (a) Choose...
Folder on Blackboard contains information on the hourly wages in pounds of a sample of young...
Folder on Blackboard contains information on the hourly wages in pounds of a sample of young Scottish workers aged 20-24.Use these data to answer the following nine questions. For numerical questions provide your answer to four decimal places. 1. Calculate the mean wage in the sample in pounds. 2. Calculate the sample standard deviation of the wage in pounds. (Assuming that I have the right answers for the above two questions which I have from an excel sheet, how do...
Get the avehighs.txt file from BB. The file contains monthly average temperatures from three different locations
  Get the avehighs.txt file from BB. The file contains monthly average temperatures from three different locations. The location ID is in the first column and monhtly average temperatures are in the next 12 columns. Write a script that will: data from file avehighs 432 33 37 42 45 53 72 82 79 66 55 46 41 777 29 33 41 46 52 66 77 88 68 55 48 39 567 55 62 68 72 75 79 83 89 85...
Access the hourly wage data on the below Excel Data File (Hourly Wage). An economist wants...
Access the hourly wage data on the below Excel Data File (Hourly Wage). An economist wants to test if the average hourly wage is less than $28. Assume that the population standard deviation is $8. b-1. Find the value of the test statistic. (Negative value should be indicated by a minus sign. Round intermediate calculations to at least 4 decimal places and final answer to 2 decimal places.) Hourly Wage Education Experience Age Gender 39.00 11 2 40 1 21.02...
The Excel file Stock Data contains monthly data for several stocks and the S&P 500 Index...
The Excel file Stock Data contains monthly data for several stocks and the S&P 500 Index (i.e., the market). Assume the risk free rate of return is 2.5%. Compute the cost of equity (required rate of return) for Cin using the classic CAPM. Compute the Weighted Average Cost of Capital (WACC) for Cin using the classic CAPM if the corporate tax rate is 20%, the cost of debt is 15% and the capital structure is: 75% equity and 25% debt....
The Excel file Stock Data contains monthly data for several stocks and the S&P 500 Index...
The Excel file Stock Data contains monthly data for several stocks and the S&P 500 Index (i.e., the market). Compute Beta for NT and the S & P 500 using the Covariance/Variance relationship. Compute Beta for NT and the S & P 500 using the EXCEL slope function. Compute the equation: Ri= ai + biRMKT for NT. Compute R2 for this equation. Compute the t-statistic for a. Is the t-statistic for a Significant or Not Significant? Compute the t-statistic for...
In order to estimate the difference between the average hourly wages of employees of two branches...
In order to estimate the difference between the average hourly wages of employees of two branches of a department store, the following data have been gathered. Assume the degrees of freedom are 36. (Assume unequal variance) Sample 1 Sample 2 Downtown Store North Mall Store n 25 20 xbar $9 $9 s $2 $1 Q. What is a point estimate for the difference between the population means? Q. What is the critical value for a 95% confidence interval for the...
Consider the data in the file Growth.csvwhich contains data on average growth rates over 1960-1995 for...
Consider the data in the file Growth.csvwhich contains data on average growth rates over 1960-1995 for 65 countries, along with variables that are potentially related to growth. A complete description of the data is given in data description which is under the name Growth- Data Description and can be found on Blackboard. Using this data, carry out the following empirical exercises: Construct a table that shows the sample mean, std. deviation, minimum and maximum values for the variablesGrowth, Trade-Share, YearsSchool,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT