100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

Summer MGT 6203 MID EXAM PART2 – CODING (QUESTIONS AND ANSWERS)

Beoordeling
-
Verkocht
-
Pagina's
16
Cijfer
A+
Geüpload op
23-01-2023
Geschreven in
2022/2023

Summer MGT 6203 MID EXAM PART2 – CODING Week 1 Use the inbuilt dataset ‘longley’ for questions 1 and 2. Q1) Fit a linear regression model with ‘Employed’ as the response variable and all other variables (except ‘Year’) as predictors. What are the significant predictors at 10% significance level? A. GNP B. GNP, Armed.Forces C. GNP, Unemployed, Population D. None of the predictors are significant at 10% significance level Solution: model1 = lm(Employed~.-Year, data = longley) summary(model1) ## ## Call: ## lm(formula = Employed ~ . - Year, data = longley) ## ## Residuals: ## Min 1Q Median 3Q Max ## -0.55324 -0.36478 0.06106 0.20550 0.93359 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 92. 35. 2.629 0.0252 * ## GNP.deflator -0. 0. -0.366 0.7217 ## GNP 0. 0. 2.269 0.0467 * ## Unemployed -0. 0. -0.921 0.3788 ## Armed.Forces -0. 0. -1.975 0.0765 . ## Population -0. 0. -1.222 0.2498 ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 0.4832 on 10 degrees of freedom ## Multiple R-squared: 0.9874, Adjusted R-squared: 0.9811 ## F-statistic: 156.4 on 5 and 10 DF, p-value: 3.699e-09 From the p-value, we can see that GNP and Armed.Forces are significant at 10% significance level. Q2) What can you say about multicollinearity in this model? a. The model does not exhibit multicollinearity b. The model exhibits multicollinearity due to high correlation between GNP, Armed.Forces c. The model exhibits multicollinearity due to high correlation between GNP, GNP.deflator and population d. The model exhibits multicollinearity due to high correlation between GNP.deflator, Unemployed Solution: vif(model1) ## GNP.deflator GNP Unemployed Armed.Forces Population ## 130. 639. 10. 2. 339. Yes, looking at the VIF table, we can see that GNP, GNP deflator and population have high VIF values indicating multicollinearity issue. We may also look at the correlation matrix to come to the same conclusion. cor(longley[,-6]) ## GNP.deflator GNP Unemployed Armed.Forces Population ## GNP.deflator 1. 0. 0. 0. 0. ## GNP 0. 1. 0. 0. 0. ## Unemployed 0. 0. 1. -0. 0. ## Armed.Forces 0. 0. -0. 1. 0. ## Population 0. 0. 0. 0. 1. ## Employed 0. 0. 0. 0. 0. ## Employed ## GNP.deflator 0. ## GNP 0. ## Unemployed 0. ## Armed.Forces 0. ## Population 0. ## Employed 1. We can see that GNP, GNP deflator and population are highly correlated causing multicollinearity issue. Week 2 Q3) The trees dataset contains the girth (diameter), height, and volume for black cherry trees. Download the dataset in R using the command “data(trees)”. Create two Linear-Linear models. The first model should use girth to predict volume, and the second model should use height to predict volume. What is the Adjusted R-Squared for each model. A. 0.9471, 0.4334 B. 0.8243, 0.3265 C. 0.9331, 0.3358 D. 0.9798, 0.3292 Solution: Q4) Using girth as the independent variable and volume as the dependent variable, which of the following models has the W

Meer zien Lees minder
Instelling
Vak










Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
23 januari 2023
Aantal pagina's
16
Geschreven in
2022/2023
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

Summer MGT 6203 MID EXAM
PART2 – CODING
Week 1
Use the inbuilt dataset ‘longley’ for questions 1 and 2.
Q1) Fit a linear regression model with ‘Employed’ as the response
variable and all other variables (except ‘Year’) as predictors. What are the
significant predictors at 10% significance level?

A. GNP
B. GNP, Armed.Forces
C. GNP, Unemployed, Population
D. None of the predictors are significant at 10% significance level

Solution:
model1 = lm(Employed~.-Year, data = longley)
summary(model1)
##
## Call:
## lm(formula = Employed ~ . - Year, data = longley)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.55324 -0.36478 0.06106 0.20550 0.93359
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 92.461308 35.169248 2.629 0.0252 *
## GNP.deflator -0.048463 0.132248 -0.366 0.7217
## GNP 0.072004 0.031734 2.269 0.0467 *
## Unemployed -0.004039 0.004385 -0.921 0.3788
## Armed.Forces -0.005605 0.002838 -1.975 0.0765 .
## Population -0.403509 0.330264 -1.222 0.2498
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4832 on 10 degrees of freedom
## Multiple R-squared: 0.9874, Adjusted R-squared: 0.9811
## F-statistic: 156.4 on 5 and 10 DF, p-value: 3.699e-09

From the p-value, we can see that GNP and Armed.Forces are significant at 10%
significance level.

Q2) What can you say about multicollinearity in this model?
a. The model does not exhibit multicollinearity
b. The model exhibits multicollinearity due to high correlation between GNP,
Armed.Forces

, c. The model exhibits multicollinearity due to high correlation between GNP,
GNP.deflator and population
d. The model exhibits multicollinearity due to high correlation between GNP.deflator,
Unemployed

Solution:
vif(model1)
## GNP.deflator GNP Unemployed Armed.Forces Population
## 130.829201 639.049777 10.786858 2.505775 339.011693

Yes, looking at the VIF table, we can see that GNP, GNP deflator and population have high
VIF values indicating multicollinearity issue. We may also look at the correlation matrix
to come to the same conclusion.

cor(longley[,-6])
## GNP.deflator GNP Unemployed Armed.Forces
Population
## GNP.deflator 1.0000000 0.9915892 0.6206334 0.4647442
0.9791634
## GNP 0.9915892 1.0000000 0.6042609 0.4464368
0.9910901
## Unemployed 0.6206334 0.6042609 1.0000000 -0.1774206
0.6865515
## Armed.Forces 0.4647442 0.4464368 -0.1774206 1.0000000
0.3644163
## Population 0.9791634 0.9910901 0.6865515 0.3644163
1.0000000
## Employed 0.9708985 0.9835516 0.5024981 0.4573074
0.9603906
## Employed
## GNP.deflator 0.9708985
## GNP 0.9835516
## Unemployed 0.5024981
## Armed.Forces 0.4573074
## Population 0.9603906
## Employed 1.0000000

We can see that GNP, GNP deflator and population are highly correlated causing
multicollinearity issue.

Week 2
Q3) The trees dataset contains the girth (diameter), height, and volume for black cherry trees.
Download the dataset in R using the command “data(trees)”. Create two Linear-Linear
models. The first model should use girth to predict volume, and the second model should use
height to predict volume. What is the Adjusted R-Squared for each model.

A. 0.9471, 0.4334
B. 0.8243, 0.3265
C. 0.9331, 0.3358
D. 0.9798, 0.3292

,
€10,61
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten


Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
ExamsConnoisseur Self
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
567
Lid sinds
3 jaar
Aantal volgers
343
Documenten
1497
Laatst verkocht
20 uur geleden

4,3

67 beoordelingen

5
40
4
11
3
12
2
1
1
3

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen