联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2022-03-01 11:32

Download the file Nambe.csv from the module webpage and load it into R.

1 The dataset

consists of information about the production of various tableware products. After casting,

each piece of tableware goes through a series of grinding and polishing steps.

The variables (adapted from the original dataset) are:

• Type: the type of product; a categorical variable with categories Bowl, Plate and Tray;

• Diam: the diameter of the product (in inches);

• Time: the total grinding and polishing time of the product (in minutes);

An engineer in the ceramic factory suggests that the total time it takes to grind and polish

the product can be predicted from its diameter using an equation of the form

time = a ◊ diameterb (1)

for some constants a and b.

(a) [4 marks] Produce a scatterplot of the grinding and polishing time against the diameter

of the product. Use dierent

colours and/or plotting symbols to show the type of the product.

Your plot should be clearly labelled and contain a legend.

(b) [3 marks] Explain how the relationship in equation (1) as suggested by the engineer

can be transformed into a relationship that can be modelled by a simple linear regression.

What assumptions are you making about the errors in the original relationship, that is in the

original scale of the response?

(c) [4 marks] Fit the simple linear regression model in (b), that is a model for the transformed

relationship. Produce a ‘residuals versus fitted values’ plot and a scale-location

plot of the fitted model and discuss whether linearity and homoscedasticity can be assumed

to hold.

(d) [2 marks] Give a quantitative interpretation of the estimated slope parameter for the

model in (c) in the original scale of the response variable Time.

(e) [2 marks] Predict the time (in minutes) that it will take to grind and polish a product

that has a diameter of 15 inches.

(f) [1 mark] Reproduce the plot from part (a) and add a curve that shows how, according to

the model in (c), the predicted time for grinding and polishing changes with diameter.

Question continues on the next page

1The data is adapted from the Nambe dataset available from DASL, the Data and Story library.

2

(g) [3 marks] The engineer sees your plot which shows the relationship between the

predicted time for grinding/polishing and the diameter. They realise that the

predicted grinding and polishing time for a given products looks like it is (approximately)

proportional to the diameter of the product. They wonder whether a

simple linear regression of time on diameter (possibly through the origin) would have suced.

Discuss whether this would have been a suitable alternative supporting your answer with

appropriate evidence.

(h) [2 marks] The engineer then suggests that the constant a in equation (1) may depend on

the type of the product. Explain how to modify the model in (b)-(c) to accommodate this.

(i) [2 marks] Write out the model equations for the new linear model suggested in (h).

(j) [2 marks] Give a description of the jth row of the design matrix for the model suggested

in (h) using indicator variables.

(k) [2 marks] Fit the model in (h). Reproduce the plot from part (a) and add a curve for

each product type that shows how, according to the fitted model, the predicted time for

grinding and polishing changes with diameter.

Hint: If c is an array of observations for the variable C and d is an array of corresponding

observations for the variable D, then to compute the predictions from a model m with

explanatory variables C and D, we use a command of the form

predict(m, list(C=c, D=d)).

(l) [3 marks] Judging from the plots in (f) and (k) do you think that the engineer was right

to suggest that the constant a in equation (1) should depend on the type of the product.

Justify your answer.

3


相关文章

版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp