首页 > > 详细

讲解 STAT7038 REGRESSION MODELLING Assignment 1 for Semester 1, 2024辅导 数据结构程序

RESEARCH SCHOOL OF FINANCE, ACTUARIAL STUDIES AND STATISTICS

REGRESSION MODELLING

(STAT7038)

Assignment 1 for Semester 1, 2024

Due date: 3:00 pm on Thursday, 28 March 2024, Canberra time

INSTRUCTIONS:

•  This assignment is worth 15% of your overall marks for this course.

• You must complete this assignment by yourself.  If you copy someone else’s work or allow your work to be copied, you will receive a mark of zero for the assignment and risk very severe academic consequences.

• Your report should be submitted to Turnitin on Wattle as a single pdf document (less than 25MB) including the following:

1.  The assignment cover sheet (available to download from Wattle).

2. Your assignment (no more than 10 pages).

3. An appendix including the R codes you used. Failure to upload the R code will result in a penalty.

• Assignments should be typed. Your assignment may include some carefully edited R output (e.g. graphs, tables) showing the results of your data analysis and a discussion of these results, as well as some carefully selected code.   Please  be selective about what you present and only include as many pages and as much R output as necessary to justify your solution. Clearly label each part of your report with the part of the question that it refers to.

•  Unless otherwise advised, use a significance level of 5%. Round numeric answers to 4 decimal places (e.g., 0.0012).

•  Marks may be deducted if these instructions are not strictly adhered to, and marks will certainly be deducted if the total report is of an unreasonable length, i.e. more than 10 pages including graphs and tables. You may include an appendix that is in addition to the above page limits; however the appendix will not be assessed.  It will only be checked if there is some question about what you have actually done.

•  Name your report “Course code-Uid”, e.g., “STAT7038-u1234567”.

•  Try to submit your assignment at least 15 mins before the deadline in case something unexpected happens, for instance internet issue.

•  Late submissions will NOT be accepted.  Extensions will usually be granted on med- ical or compassionate grounds on production of appropriate evidence, but must have lecturer’s permission at least 24 hours before the deadline.

Question 1                                                                                                                 [50 Marks]

You are looking for a job as a salesperson.  There is a company that comes into your mind.  You want to know the payment structure of the this company, that is how the income of an employer is related to the number of items he or she sells each month. However,  such information is not disclosed.   You  contacted  the  sales department of this company and they kindly provided you with the data “sales.csv” (available to be downloaded from Wattle) about the employee’s income (Y) and number  of  items  sold (X) on a sample of 50 employees. You now decide to use your knowledge learned from this course to find out the relationship.

For this assignment, you are interested in whether or not the number of items sold by the employee can be used to predict the employee’s income.

(a)  [5 marks]  Let the employee’s  income be the response variable Y and number of items  sold be the predictor variable X.  Conduct an exploratory data analysis to assess whether the two variables are associated.  Is there a statistically significant correlation between the variables?

Use the cor. test() function to conduct a suitable hypothesis test.  Clearly specify the hypotheses you are testing and present and interpret the results.

(b)  [15 marks]  Fit  a simple linear regression  (SLR) model.   Construct a plot of the residuals against the fitted values, a normal Q-Q plot of the residuals, a bar plot of the leverages for each observation and a bar plot of Cook’s distances for each obser- vation. Use these plots (and other means) to comment on the model assumptions and on any unusual data points.

(c)  [10 marks]  Produce the ANOVA  (Analysis of Variance) table for the SLR model and conduct the F-test based on the output. What is the coefficient of determina- tion for this model and how should you interpret this summary measure?

(d)  [10 marks]  What are the estimated coefficients of the SLR model in part  (b) and the standard errors associated with these coefficients?  Interpret the values of these estimated coefficients and perform t-tests to test whether or not these coefficients differ significantly from zero. What do you conclude as a result of these t-tests?

(e)  [10 marks]  Number of items sold below 100 is typically categorised as “low sales”; from  100 to 200 as  “normal sales”, and over 200 as “high sales”.   Use this SLR model to predict the income for groups of employees with typical numbers of sold 80 (“moderately low sales”), 150 (“normal”), and 300 (“high”), respectively. Find 95% confidence intervals for these predictions.  Do you think this SLR model is a good model for making these predictions?  If you believe this SLR model is not very appropriate, make some suggestions on how to improve the model (simply make suggestions, you don’t need to actually refit the model and produce more outputs).

Question 2                                                                                                                [50 Marks]

The US Centers for Disease Control and Prevention (CDC) use data from the National Health and Nutrition Examination Survey  (NHANES) to develop a series of clinical growth charts for assessing healthy growth ranges in boys and girls.  The data “kid- weights.csv” (available to be downloaded from Wattle) contains a sample of 250 obser- vations taken from the NHANES data. The data frame contains the age (in months), weight (in pounds) and height (in inches) for 129 girls (gender = F) and 121 boys (gender = M), with age ranging from 3 months to 144 months (12 years).

We are interested in whether or not the variable  “age”,  can be used to predict the variable “weight”, for both girls and boys combined.

(a)  [10 marks]  Let  “weight”  be the response variable Y and “age” be the predictor variable X. Is there a linear association between the two variables? You may want to experiment with the natural log transformation (log()), to one or both of your variables to assess the linear association.   Make a choice at this stage,  for your transformed variables and provide justification for this choice.

(b)  [15 marks]  With your chosen transformations, fit a simple linear regression (SLR) model. Construct a plot of the residuals against the fitted values, a normal Q-Q plot of the residuals, a bar plot of the leverages for each observation and a bar plot of Cook’s distances for each observation.  Use these plots  (and other means) to comment on the model assumptions and on any unusual data points.

(c)  [15 marks]  Write down the estimated model that you have fitted in part (b).  Then write this estimated model in terms of the original untransformed variables X and Y (e.g. back-transform. the model into the original scale).  Based on the mathematical expression, what happens to Y when the value of X is multiplied by a factor of k? Generate a scatter plot of X and Y on the original scale, then add the fitted curve representing this estimated model in this scatter plot.

(d)  [10 marks]  Use the same transformation for the response as you did in part (b), now we consider fitting a SLR using the square root of age as the predictor.  Interpret the new model. Check the model assumptions. How do this model compare to the one in parts (b)?





联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!