The questions involve the data set for asking prices of Richmond
townhouses obtained on 2014.11.03.
For your subset, the response variable is:
asking price divided by 10000:
askpr=c(53.9, 50.8, 46.8, 48.8, 62.9, 68.8, 62.8888, 58.68, 54.8,
79.99, 55.8, 60.8, 73.8, 56.88, 25.9, 47.9, 65.8, 45.99, 59.8,
50.8, 57.8, 55.2, 54.8, 52.4, 56.8, 81.9, 40.8, 48.5, 51.68, 58.8,
40.8, 33.7, 68.5, 53.8, 41.99, 58.39, 68.5, 73.9, 79.8, 26.99,
68.8, 47.8, 78.8, 71.99, 57.5, 54.98, 77.8, 57.8, 53.8, 74.8)
The explanatory variables are:
(i) finished floor area divided by 100
ffarea=c(11.84, 16.6, 16.2, 14.8, 14, 16.9, 15.77, 13.96, 11.26,
22, 13.06, 13.2, 17.54, 15.78, 6.1, 12.1, 13.45, 16.01, 17.63,
12.27, 13.84, 15.3, 15.46, 16.22, 15.5, 20.95, 14, 14.8, 15.1,
17.37, 12.26, 12, 13.59, 10.95, 12.9, 15.09, 15.76, 15.15, 15.25,
10.5, 15.95, 13.34, 19.48, 15.05, 13.46, 13.06, 16.5, 12.01, 12.22,
17.48)
(ii) age
age=c(15, 23, 30, 50, 5, 8, 6, 9, 0, 20, 0, 3, 9, 17, 11, 7, 1, 25,
26, 17, 10, 9, 41, 25, 23, 19, 38, 24, 20, 26, 29, 28, 2, 18, 44,
8, 4, 0, 3, 37, 18, 32, 11, 8, 10, 1, 3, 0, 9, 5)
(iii) monthly maintenance fee divided by 10
mfee=c(21, 19.9, 16, 25, 19.6, 19.4, 35.7, 22, 24.8, 26.7, 18.6,
18.9, 18.2, 17.3, 17.1, 18, 18.2, 33.7, 32, 25.2, 16, 16.9, 31,
36.4, 17.4, 34.8, 23, 16.1, 24.5, 31, 19.8, 25.9, 17, 24.7, 23.2,
20.3, 22.1, 22.2, 35, 28, 23.6, 24.5, 20.4, 22.3, 22.1, 19.6, 25.4,
14.2, 18.5, 29.7)
(iv) number of bedrooms
beds=c(2, 4, 4, 3, 3, 4, 3, 3, 2, 3, 3, 3, 4, 4, 1, 3, 3, 3, 5, 2,
3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 2, 3, 2, 3, 4, 4, 4, 2, 2, 3, 3,
3, 3, 3, 3, 4, 3, 3, 4)
You are to make a prediction of the response variable when
ffarea=16, age=6, mfee=26, beds=4.
You are to fit three multiple regression models with the response
variable askpr:
(i) 2 explanatory variables ffarea, age
(ii) 3 explanatory variables ffarea, age, mfee
(iii) 4 explanatory variables ffarea, age, mfee, beds
After you have copied the above R vectors into your R session, you
can get a dataframe with
richmondtownh=data.frame(cbind(askpr,ffarea,age,mfee,beds))
Please use 3 decimal places for the answers below which are not
integer-valued
Answer:
Part a.
Adjusted R square for
2 explanatory 0.805
3 explanatory 0.805
4 explanatory 0.805
Part b.
Number of explanatory variables: 2
Part c.
Coefficient for ffarea = 3.519
95% CI = (2.907, 4.131)
Part d:
Prediction: 68.104 SE= 5.727
Upper endpoint of 95% prediction: 79.859
Rcode:
askpr=c(53.9, 50.8, 46.8, 48.8, 62.9, 68.8, 62.8888, 58.68, 54.8, 79.99, 55.8, 60.8, 73.8, 56.88, 25.9, 47.9, 65.8, 45.99, 59.8, 50.8, 57.8, 55.2, 54.8, 52.4, 56.8, 81.9, 40.8, 48.5, 51.68, 58.8, 40.8, 33.7, 68.5, 53.8, 41.99, 58.39, 68.5, 73.9, 79.8, 26.99, 68.8, 47.8, 78.8, 71.99, 57.5, 54.98, 77.8, 57.8, 53.8, 74.8)
ffarea=c(11.84, 16.6, 16.2, 14.8, 14, 16.9, 15.77, 13.96, 11.26, 22, 13.06, 13.2, 17.54, 15.78, 6.1, 12.1, 13.45, 16.01, 17.63, 12.27, 13.84, 15.3, 15.46, 16.22, 15.5, 20.95, 14, 14.8, 15.1, 17.37, 12.26, 12, 13.59, 10.95, 12.9, 15.09, 15.76, 15.15, 15.25, 10.5, 15.95, 13.34, 19.48, 15.05, 13.46, 13.06, 16.5, 12.01, 12.22, 17.48)
age=c(15, 23, 30, 50, 5, 8, 6, 9, 0, 20, 0, 3, 9, 17, 11, 7, 1, 25, 26, 17, 10, 9, 41, 25, 23, 19, 38, 24, 20, 26, 29, 28, 2, 18, 44, 8, 4, 0, 3, 37, 18, 32, 11, 8, 10, 1, 3, 0, 9, 5)
mfee=c(21, 19.9, 16, 25, 19.6, 19.4, 35.7, 22, 24.8, 26.7, 18.6, 18.9, 18.2, 17.3, 17.1, 18, 18.2, 33.7, 32, 25.2, 16, 16.9, 31, 36.4, 17.4, 34.8, 23, 16.1, 24.5, 31, 19.8, 25.9, 17, 24.7, 23.2, 20.3, 22.1, 22.2, 35, 28, 23.6, 24.5, 20.4, 22.3, 22.1, 19.6, 25.4, 14.2, 18.5, 29.7)
beds=c(2, 4, 4, 3, 3, 4, 3, 3, 2, 3, 3, 3, 4, 4, 1, 3, 3, 3, 5, 2, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 2, 3, 2, 3, 4, 4, 4, 2, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 4)
richmondtownh=data.frame(cbind(askpr,ffarea,age,mfee,beds))
Model1 <- lm(askpr ~ ffarea+age, data= richmondtownh)
summary(Model1)
Model2 <- lm(askpr ~ ffarea+age+mfee, data= richmondtownh)
summary(Model2)
Model3 <- lm(askpr ~ ffarea+age+mfee+beds, data= richmondtownh)
summary(Model3)
confint(Model1, 'ffarea', level=0.95)
newdata = data.frame(ffarea=16,age=6)
predict(Model1, newdata, interval="prediction",conf.level=.95)
R output:
Call:
lm(formula = askpr ~ ffarea + age, data = richmondtownh)
Residuals:
Min 1Q Median 3Q Max
-11.1668 -4.4598 -0.0047 3.8634 12.6005
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15.2711 4.5777 3.336 0.00167 **
ffarea 3.5189 0.3044 11.560 2.43e-15 ***
age -0.5780 0.0639 -9.046 7.35e-12 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.735 on 47 degrees of freedom
Multiple R-squared: 0.8128, Adjusted R-squared: 0.8048
F-statistic: 102 on 2 and 47 DF, p-value: < 2.2e-16
>
> Model2 <- lm(askpr ~ ffarea+age+mfee, data= richmondtownh)
> summary(Model2)
Call:
lm(formula = askpr ~ ffarea + age + mfee, data = richmondtownh)
Residuals:
Min 1Q Median 3Q Max
-12.5179 -4.6707 0.0602 3.7629 10.7233
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 13.59960 4.86405 2.796 0.00753 **
ffarea 3.40351 0.32486 10.477 9.06e-14 ***
age -0.59727 0.06664 -8.963 1.17e-11 ***
mfee 0.15875 0.15654 1.014 0.31585
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.733 on 46 degrees of freedom
Multiple R-squared: 0.8169, Adjusted R-squared: 0.8049
F-statistic: 68.39 on 3 and 46 DF, p-value: < 2.2e-16
> Model3 <- lm(askpr ~ ffarea+age+mfee+beds, data= richmondtownh)
> summary(Model3)
Call:
lm(formula = askpr ~ ffarea + age + mfee + beds, data = richmondtownh)
Residuals:
Min 1Q Median 3Q Max
-12.150 -4.676 0.081 3.869 10.782
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15.94889 5.35275 2.980 0.00464 **
ffarea 3.62634 0.38817 9.342 4.19e-12 ***
age -0.59718 0.06657 -8.971 1.39e-11 ***
mfee 0.09248 0.16872 0.548 0.58633
beds -1.35115 1.29136 -1.046 0.30101
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.727 on 45 degrees of freedom
Multiple R-squared: 0.8212, Adjusted R-squared: 0.8053
F-statistic: 51.67 on 4 and 45 DF, p-value: 2.933e-16
confint(Model1, 'ffarea', level=0.95)
2.5 % 97.5 %
ffarea 2.906502 4.131211
>
> newdata = data.frame(ffarea=16,age=6)
> predict(Model1, newdata, interval="prediction",conf.level=.95)
fit lwr upr
1 68.10448 56.34961 79.85935
>
The questions involve the data set for asking prices of Richmond townhouses obtained on 2014.11.03. For...
1. In the Real Estate data example, we predicted Prices using
one or more independent variables. If you were conducting Simple
Linear Regression, using Distance to the Nearest MRT Station as the
independent variable, what would the R squared value be?
2. If the correlation coefficient between House Age and House
Price is -0.210567. Without doing a regression analysis, state the
R squared value of the simple linear regression between House Age
and House Price.
3.
Consider the following multiple...
Exercise 2. [Data analysis, requires R] For this questions use the bac data set from the openintro library. To access this data set first install the package using install.packages ("openintro") (this only needs to be done once). Then load the pack- age into R with the command library(openintro). You can read about this data set in the help menu by entering the command ?openintro or help(openintro). Many people believe that gender, weight, drinking habits, and many other factors are much...
Need help with stats true or false questions
Decide (with short explanations) whether the following statements are true or false a) We consider the model y-Ao +A(z) +E. Let (-0.01, 1.5) be a 95% confidence interval for A In this case, a t-test with significance level 1% rejects the null hypothesis Ho : A-0 against a two sided alternative. b) Complicated models with a lot of parameters are better for prediction then simple models with just a few parameters c)...
2.) The data set named "HW 6.2" contains a random sample of 35 movies released in 2008 collected from the Internet Movie Database (IMDb). The goal of this problem is to explore if the information available soon after a movie's theatrical release can successfully predict total revenue. All dollar amounts (i.e., variables "Budget", "Opening", and "USRevenue") are measured in millions of dollars. . Investigate the relationship between the explanatory variable "Budget" and response variable "USRevenue" by doing the following: a....
data file: "STATE" "MALE" "BIRTH" "DIVO" "BEDS" "EDUC" "INCO" "LIFE" AK 119.1 24.8 5.6 603.3 14.1 4638 69.31 AL 93.3 19.4 4.4 840.9 7.8 2892 69.05 AR 94.1 18.5 4.8 569.6 6.7 2791 70.66 AZ 96.8 21.2 7.2 536.0 12.6 3614 70.55 CA 96.8 18.2 5.7 649.5 13.4 4423 71.71 CO 97.5 18.8 4.7 717.7 14.9 3838 72.06 CT 94.2 16.7 1.9 791.6 13.7 4871 72.48 DC 86.8 20.1 3.0 1859.4 17.8 4644 65.71 DE 95.2 19.2 3.2 926.8 13.1...
2. Using the data set of the Health Exam Results, conduct the following analysis between the variables of weight (WT) and Body Mass Index (BMI). Number the data set from 1 to 40, and select the following individuals: . Set 1 (Malo): 1, 5, 10, 13, 15, 18, 19, 24, 29, 31, 32, 33 .Set 2 (Fomalo): 4, 9, 15, 16, 17, 22, 23, 29, 33, 37, 38, 40 Draw a scatter diagram of the sample of 12 data set...
All of the following questions are in relation to the following journal article which is available on Moodle: Parr CL, Magnus MC, Karlstad O, Holvik K, Lund-Blix NA, Jaugen M, et al. Vitamin A and D intake in pregnancy, infant supplementation and asthma development: the Norwegian Mother and Child Cohort. Am J Clin Nutr 2018:107:789-798 QUESTIONS: 1. State one hypothesis the author's proposed in the manuscript. 2. There is previous research that shows that adequate Vitamin A intake is required...
What kind of instruments were used in the study? Did it
clearly link to the research question? (One paragraph
minimum)
Page Organlzation of Hospital Nursing and 30-day Readmissions In Medicare Patlents Undergoing Surgery Chenjuan Ma, PhD National Database of Nursing Quality Indicators, University of Kansas School of Nursing 3901 Rainbow Bvd, M/S 3060 Kansas City, KS 66160, USA Matthew D McHugh, PhD, and Center for Heath Outcomes and Palcy Research University of Pennsyivania School of Nursing 418 Cune Bivd., Fagin...
CASE 1-5 Financial Statement Ratio Computation Refer to Campbell Soup Company's financial Campbell Soup statements in Appendix A. Required: Compute the following ratios for Year 11. Liquidity ratios: Asset utilization ratios:* a. Current ratio n. Cash turnover b. Acid-test ratio 0. Accounts receivable turnover c. Days to sell inventory p. Inventory turnover d. Collection period 4. Working capital turnover Capital structure and solvency ratios: 1. Fixed assets turnover e. Total debt to total equity s. Total assets turnover f. Long-term...