Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

STAT2008/2014/4038/6014/6038 Regression Modelling

Assignment 2

Semester 2, 2022

Questions (100 marks)

We have cross-section data originating from the May 1985 Current Population Survey by the US Census Bureau.  These data consist of a random sample of 534 workers, with information on wages and other characteristics of the workers.   We are interested in the

relationship between the wage of a person and these characteristics. Please use the data set called “Wage.csv” on Wattle. The variables considered are:

wage Wage (in dollars per hour).

•  education Number of years of education.

•  experience Number of years of potential work experience (age - education - 6).

•  age Age in years.

 gender Factor indicating gender.

•  occupation Factor with levels worker” (tradesperson or assembly line worker), ”tech- nical” (technical or professional worker), ”services” (service worker), ”office” (office and clerical worker), ”sales” (sales worker), ”management” (management and administra-

tion).

 married Factor. Whether the individual is married or not.

You could use the following code to import the data:

read.csv("Wage.csv", stringsAsFactors = T)

(a)  [5 marks] Conduct an Exploratory Data Analysis (EDA) on the numerical variabels, in doing your analysis you need to assess whether each of the numercial covariates is associated with the response variable.  In you answer, you also need to raise the potential problem(s) you may have in fitting the regression model.

(b)  [5 marks] Fit a multiple linear regression (MLR) model with log(wage) as the response variable and all other numeric variables as predictors.   Test whether this model is significant.

(c)  [10 marks] What are the estimated coefficients of the (MLR) model in part (b) and the standard errors associated with these coefficients?  Interpret the values of each of the estimated coefficients with regards to model specification.  Construct 95% Bonferroni joint confidence intervals for all the slope parameters.

(d)  [10 marks] Comment on the t-test results in the summary output. Do they contradict with the test result in part (b)? Why or why not? Conduct a diagnostic check for this particular problem with the fitted model both qualitatively and quantitatively.  (Hint: In partially answering this question, you may refer back to part (a).) What should be done to solve this problem?

(e)  [15 marks] Fit a multiple lieanr regession model (MLR) with log(wage) as the response variable and all the other variables as predictors.  Please make sure this model allows you to conduct the following nested tests of hypotheses.

H0  : βexperience  = βage  = βgender  = βoccupation  = βmarried  = 0

H0  : βexperience  = βage  = βoccupation  = βmarried  = 0

H0  : βexperience  = βoccupation  = βmarried  = 0

H0  : βexperience  = βoccupation  = 0

H0  : βexperience  = 0

Fully write out the tests, including the four steps in testing each set of the hypothesis.

(f)  [20 marks] Using the model in (e), produce a plot of externally studentized residuals

against fitted values, a normal QQ plot, a leverage plot, a Cooks distance plot and a

number of DFBETAs plots for all the slope coefficients in your model.  Comment on the model assumptions and unusual points. What are the characteristics of the workers identified as unusual data points?

(g)  [10 marks] You decide to include in the model only education and experience as potential predictors.  However, you are not sure what kind of marginal relationship is between experience and the response log(wage), given that education is already included in the model. Generate an appropriate plot to visually check this relationship and comment on the plot. Then conduct a test whether a second-order term is needed for experience given education is in the model.

(h)  [5 marks] How does marital status affect the wage? Conduct a test of whether married people earn more salary than unmarried people by fitting a simple linear regression model.  Then provide a 95% confidence interval on the slope coefficient and interpret this interval.

(i)  [5 marks] Construct an appropriate model to test whether married people earn more salary than unmarried people given that education, experience are controlled.  (You may choose to include, the second-order of experience or not based on your result in part (g).)  Compare the test result with part (h) and comment on the reason of difference if any.

(j)  [15 marks] Now consider the model with only first-order experience and occupation as the covariates.   Add the interaction term between experience and occupation. Generate a scatter plot of log(wage) against experience and use different colors for different occupation levels.  Add fitted lines for each occupation level in a different color.  Comment on the plot whether there is visible interaction.  Then test whether the interaction is significant.