Home /
Expert Answers /
Statistics and Probability /
solve-all-parts-since-this-is-only-1-question-question-3-27-marks-a-company-wants-to-predict-sal-pa161

solve all parts since this is only 1 question.

Question 3 [27 marks]. A company wants to predict sales as a function of various other quantities including advertising spend, and whether it is summer (coded as 1 for summer. 0 for the rest of the year). These are named sales, ad spend, summer in the dataset in $R$, and the dataset is called sales_data. The following $R$ commands are run: model1 = $1m$ (sales ad spend+summer, data=sales_data) summary (model1) Part of the output is: Coefficients : (a) What are the interpretations of the coefficients for ad spend and summer? (b) From this model, do sales appear to be significantly related to advertising spend? (c) If the following $R$ command is run: predict (model1, newdata=data, frame (ad spend $=200$, summer=1)) what will the numerical output be? What is the interpretation of this quantity? (d) The following $R$ commands are run to produce the plot below: plot ( $x$ modeli\$fitted, values, $y=$ model1\$residuals) abline $(h=0)$ Which assumptions of the model appear not to hold here?
Consider now the following R code: $n=$ nrow (sales_data) $pr=$ vector (length=n) for $(i$ in $1:n){$ modeli $=1m($ sales ad_spend + summer, sales_data $[?1]$, \}$pr[i]=$ predict (modeli, newdata=sales_data $[i]$, $r=sales$ data $$$ sales - pr $S=sum(r_{?}2)$ (e) What is the name for the statistical procedure that the code is carrying out? (f) Explain what each of the two lines of code inside the loop is doing. (g) When the code has run, what will $x$ contain? What will S contain? [3] (h) What aspect of the model is this method trying to assess? [3] (i) How would the method compare two or more models fitted to the same dataset? [2]

Question 3: (a) Here ad.spend=0.73191 i.e. if ad.spend is increased by 1 unit and other explanatory variable "summer" is kept fixed then the sales are

Live Sessions

Online Lab Report Help

Online Project Report Help

Online Assignment Help

Essay Writing Help

CPM Homework Help

Mortgage Calculator

Electrical Engineering

Civil Engineering

Chemical Engineering

Electronics and Communication Engineering

Mathematics

Physics

Chemistry

Software Works/ Computer Science

Other Subjects

100% Correct Solutions

24/7 Availability

One stop destination for all subject

Cost Effective

Solved on Time

Plagiarism Free Solutions

Confidentiality