Question

In: Statistics and Probability

Question 3: Refer to dataset ‘Rails.csv’ on Canvas. Consider a model with adj2007 (estimated 2007 price...

Question 3: Refer to dataset ‘Rails.csv’ on Canvas. Consider a model with adj2007 (estimated 2007 price in thousands of 2014 dollars) as a response variable and distance (distance to the closest bike trail in km) and squarefeet (square footage of interior finished space in thousands of square feet) as explanatory variables. (a) (10 points) Assess the significance of this model using R. Show and label all steps and show your work. Don’t forget to verify the conditions in the proper step. (b) (2 points) Suppose that the model is significant. What is the expected estimated 2007 price in thousands of 2014 dollars when the distance to the closest trail is half a kilometer and the interior finished space is 2 thousand square feet? Show work in R. (c) (5 points) Suppose the model is significant and that the required conditions for regression are satisfied. Obtain a 90% confidence interval for the mean response when distance = 0.5 and squarefeet = 2. Also calculate ��! , the standard error of the point estimate �. No need to show the four-step process for the interval but do show all your work in R. (d) (5 points) Suppose the model is significant and that the required conditions for regression are satisfied. Obtain a 99% prediction interval for a new response value when distance = 1 and squarefeet = 1. Also calculate ��! the standard error of the point estimate �. No need to show the four-step process for the interval but do show all your work in R. this is the file: https://ufile.io/fce2t

Solutions

Expert Solution

The following text is in R script. The output is not typed here. Following this i have pasted the output.

rails=read.csv("C:/Users/Asus/Desktop/rails.csv",header=T)
attach(rails)

rails.lm<-lm(adj2007~distance+squarefeet,data=rails);rails.lm #fitting a regression model using the given variables

a)

summary(rails.lm) # this gives the summary of the model and also tests for the hypothesis

#from the summary, we can see that p values of both distance and squarefeet are less than 0.05 and hence the model is significant

b)

# now we know that the model is significant and we go for further analysis.

newdata=data.frame(distance=0.5,squarefeet=2)
predict(rails.lm,newdata) # predicts the value of adj2007 using the fitted regression model

c)

predict(rails.lm,newdata,interval="predict",level=0.90) #90% prediction interval for the mean response when distance =0.5 and squarefeet=2
std.error=(403.0597-317.1182)/qt(0.1/2,104-2);std.error # derived from the formula of prediction interval for mean response

#alternate method
std.error=(489.0011-403.0597)/qt(0.1/2,104-2);std.error
d)

newdata=data.frame(distance=1,squarefee=1)
predict(rails.lm,newdata,interval="predict",level=0.99) #99% prediction interval of the new response variable
std.error2=(394.8167-258.9515)/qt(0.01/2,104-2);std.error

OUTPUT:

> rails=read.csv("C:/Users/Asus/Desktop/rails.csv",header=T)
> attach(rails)
The following objects are masked _by_ .GlobalEnv:

adj2007, distance, squarefeet

>
> rails.lm<-lm(adj2007~distance+squarefeet,data=rails);rails.lm #fitting a regression model using the given variables

Call:
lm(formula = adj2007 ~ distance + squarefeet, data = rails)

Coefficients:
(Intercept) distance squarefeet
109.74 -16.49 150.78

>
>
> summary(rails.lm) # this gives the summary of the model and also tests for the hypothesis

Call:
lm(formula = adj2007 ~ distance + squarefeet, data = rails)

Residuals:
Min 1Q Median 3Q Max
-138.835 -32.621 -1.903 27.369 145.504

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 109.742 20.057 5.472 3.25e-07 ***
distance -16.486 5.942 -2.775 0.00659 **
squarefeet 150.780 9.998 15.080 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 51.34 on 101 degrees of freedom
Multiple R-squared: 0.7655, Adjusted R-squared: 0.7608
F-statistic: 164.8 on 2 and 101 DF, p-value: < 2.2e-16

>
> #from the summary, we can see that p values of both distance and squarefeet are less than 0.05 and hence the model is significant
>
>
> # now we know that the model is significant and we go for further analysis.
>
> newdata=data.frame(distance=0.5,squarefeet=2)
> predict(rails.lm,newdata) # predicts the value of adj2007 using the fitted regression model
1
403.0597
>
>
> predict(rails.lm,newdata,interval="predict",level=0.90) #90% prediction interval for the mean response when distance =0.5 and squarefeet=2
fit lwr upr
1 403.0597 317.1182 489.0011
> std.error=(403.0597-317.1182)/qt(0.1/2,104-2);std.error # derived from the formula of prediction interval for mean response
[1] -51.77417
>
> #alternate method
> std.error=(489.0011-403.0597)/qt(0.1/2,104-2);std.error
[1] -51.77411
>
> newdata=data.frame(distance=1,squarefee=1)
> predict(rails.lm,newdata,interval="predict",level=0.99) #99% prediction interval of the new response variable
fit lwr upr
1 394.8167 258.9515 530.6819
> std.error2=(394.8167-258.9515)/qt(0.01/2,104-2);std.error
[1] -51.77411
>



Related Solutions

Question 3: Refer to dataset ‘Rails.csv’ on Canvas. Consider a model with adj2007 (estimated 2007 price...
Question 3: Refer to dataset ‘Rails.csv’ on Canvas. Consider a model with adj2007 (estimated 2007 price in thousands of 2014 dollars) as a response variable and distance (distance to the closest bike trail in km) and squarefeet (square footage of interior finished space in thousands of square feet) as explanatory variables. (a) (10 points) Assess the significance of this model using R. Show and label all steps and show your work. Don’t forget to verify the conditions in the proper...
Question 3: Refer to dataset ‘Rails.csv’ on Canvas. Consider a model with adj2007 (estimated 2007 price...
Question 3: Refer to dataset ‘Rails.csv’ on Canvas. Consider a model with adj2007 (estimated 2007 price in thousands of 2014 dollars) as a response variable and distance (distance to the closest bike trail in km) and squarefeet (square footage of interior finished space in thousands of square feet) as explanatory variables. (a) (10 points) Assess the significance of this model using R. Show and label all steps and show your work. Don’t forget to verify the conditions in the proper...
The cross-price elasticity between two products is estimated to be 3. If the price of the...
The cross-price elasticity between two products is estimated to be 3. If the price of the first product is decreased by 3.9%, demand for the second product will change by_____%. Hint: Round to the second decimal. Answers are in percentages and can be positive or negative. If you calculate .0151 then input the answer as 1.51. Assume that the price and income elasticities of demand for luxury cars are EP = –0.52 and EY = 3.2 respectively. In the coming...
Consider a relational dataset and specify your input and output variables, then: Train the model using...
Consider a relational dataset and specify your input and output variables, then: Train the model using 80% of this dataset and suggest an appropriate GLM model output to input variables. Specify the significant variables on the output variable at the level of ?=0.05 and explore the related hypotheses test. Estimate the parameters of your model. Predict the output of the test dataset using the trained model. Provide the functional form of the optimal predictive model. Provide the confusion matrix and...
Question 3 a.   Explain the assumptions in the Black-Scholes-Merton model? b.   What is the price of...
Question 3 a.   Explain the assumptions in the Black-Scholes-Merton model? b.   What is the price of a European call option on a non‐dividend‐paying stock with the stock price is £73, with a strike price is £73, volatility is 40% pa. risk‐free interest rate is 10% pa, and the time to maturity is 6 months? c.   Without applying the Black‐Scholes model, what is the price of a 6 month European put on the same stock in b) with strike price of...
Question 3. 1. A CFO says, “The dividend growth model implies that the current stock price...
Question 3. 1. A CFO says, “The dividend growth model implies that the current stock price equals the present value of future dividends. We thus increase dividend payouts rather than retaining earnings to maximize the stock price." Do you agree with the CFO? Justify your answer. (You do not have to criticize the dividend growth model but discuss the CFO's interpretation of the model.) 2. Regarding the CFO's statement above, a treasurer responds as follows: “I do not agree. Retained...
Question 3 [14] Consider the following prices and quantities: Price (per kg)                             &nb
Question 3 [14] Consider the following prices and quantities: Price (per kg)                                         Quantities produced            2010 2012 2015 2010 2012 2015 Beans 3.95 3.89 4.13 675 717 436 Onions 61.50 62.20 59.70 117 115 115 Carrots 34.80 35.40 38.90 77 74 82 1. Compute and interpret the Paasche’s Quantity Index number for the year 2012 with 2010 as the base year.                                                                                                           (7) 2. Compute and interpret the Laspeyres Price Index number for the year 2015 with 2012 as...
I need this question solution: please 1. Consider the variant of the Hotelling ‘location-then-price’ duopoly model...
I need this question solution: please 1. Consider the variant of the Hotelling ‘location-then-price’ duopoly model (studied in lectures) in which consumers must travel to the location of the firm they choose to purchase from. The cost incurred by a consumer located at x ∈ [0,1] of travelling to location xi of firm i is given by t|x − xi | (t > 0 is the disutility or transport cost per unit of distance). Assume that firms are situated away...
QUESTION TWO Consider the model:                                     Yi=β1+
QUESTION TWO Consider the model:                                     Yi=β1+β2X1+Ui Explain all the terms included in the model above Given the model above, state the way econometricians proceed in their analysis of an economic problem?      Explain the importance of Ui in this model?What are the four reasons for the inclusion of this error term in the regression model? What is the difference between the disturbance term and the residual term? Explain the meaning of statistical inference? State the ten assumptions of the classical linear...
1. Compare the stock prices estimated by the discounted FCF model to the actual stock price....
1. Compare the stock prices estimated by the discounted FCF model to the actual stock price. What recommendations can you make as to whether clients should buy or sell stock based on your price estimates from the discounted FCF method? Why? 2. Explain why the stock price estimate from the discounted FCF model differs from the actual stock price Assume the stock price is $7 per share, actual stock price is $4 per share
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT