logo

Linear Modeling Question and Answer

   

Added on  2022-08-19

12 Pages1549 Words9 Views
Linear Modeling
In this assignment, you will continue working with the ISLR College data set to examine
the relationships between variables and use these relationships to model values. You
will need to load the ISLR package as well as stats and car.
1. Explore the relationship between the number of applicants (App) and the number of
acceptances (Accept).
To examine the relationship between the number of applicants and number of
acceptances, correlation was conducted and the results show that correlation value is
0.94 which indicates strong positive relationship between the two variables (Mukaka,
2012).
a. Use lm to obtain a best fit linear model for Accept (y-variable) based on App
(x-variable).
Call:
lm(formula = Accept ~ Apps, data = df)
Residuals:
Min 1Q Median 3Q Max
-6344.8 -154.2 -35.2 184.7 5490.5
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.253e+02 3.692e+01 6.101 1.66e-09 ***
Apps 5.975e-01 7.542e-03 79.226 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 813.1 on 775 degrees of freedom
Multiple R-squared: 0.8901, Adjusted R-squared: 0.89
F-statistic: 6277 on 1 and 775 DF, p-value: < 2.2e-16
b. What is the correlation co-efficient for these? Explain what this tells you.
The correlation coefficient for these is 0.597 which suggests that one
unit increase in the application increase the acceptance by 0.59 units
holding all other things constant (Wooldridge, 2002).
c. What is the best fit equation? Explain what this tells you. Be sure to interpret
both the slope and intercept in context.
Linear Modeling Question and Answer_1
The best fit equation can be presented as follows:
Acceptance = 225 + 0.59Apps
The intercept 225 tells us that if there is no application then the acceptance
is still 225 (this doesn't make sense, the line has to start from origin in this
case)
The slope 0.59 tells us that for each 1 unit change in application, acceptance
changes by 0.59 unit
d. Use a plot to show the points and best fit equation together on a single
graph, to show the residuals for the fit, and to show the leverage for each
point. Add a brief explanation in your own words for what each graph tells
you.
Linear Modeling Question and Answer_2
Linear Modeling Question and Answer_3
2. In previous analysis, you showed that the Accept data was not normal. Best fit linear
models are based on an assumption that all variables are normal. By using
transformations, you can better meet this assumption.
a. Create a new variable AcceptTrans that transforms Accept to normal. State
the equation for this transformation.
AcceptTrans = log(Accept) : logarithm transformation of Accept variable
Linear Modeling Question and Answer_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Linear Regression and Correlation Analysis Assignment
|13
|1372
|109

Frequency Analysis of Regenerate Vegetative or by Seed and Cross-Classified Plant Species
|9
|1580
|251

Change in Unemployment Rate Question Answer 2022
|14
|2093
|36

Regression Analysis | Assignment-1
|7
|872
|19

Environmental Data Analysis - Assignment
|5
|1407
|16

Applied Statistics: ANOVA and Multiple Regression Analysis
|11
|2461
|321