SVU Data Science and Big data Analysis Regression HW06 Q1 Linear Regression Example HW06 Q2 Logistic Regression Example HW06 Q3 Cars –https://www.kaggle.c

SVU Data Science and Big data Analysis Regression HW06 Q1 Linear Regression Example
HW06 Q2 Logistic Regression Example
HW06 Q3 Cars

–https://www.kaggle.com/jerinvarghese/linear-regres…

Don't use plagiarized sources. Get Your Custom Essay on
SVU Data Science and Big data Analysis Regression HW06 Q1 Linear Regression Example HW06 Q2 Logistic Regression Example HW06 Q3 Cars –https://www.kaggle.c
For $10/Page 0nly
Order Essay

HW06 Q4 Logistic Regression in R

–https://stats.idre.ucla.edu/r/dae/logit-regression…

HW06 Q5 Perform a logistic regression on the following

–https://www.kaggle.com/hidede/graduate-admissions/…

–This is an ongoing Kaggle competition (create a Kaggle account) School of Computer &
Information Sciences
ITS 836 Data Science and Big Data Analytics
ITS 836
1
Lecture 06 HW06 Regression
• HW06 Q1 Linear Regression Example
• HW06 Q2 Logistic Regression Example
• HW06 Q3 Cars
– https://www.kaggle.com/jerinvarghese/linear-regression-with-r/code
• HW06 Q4 Logistic Regression in R
– https://stats.idre.ucla.edu/r/dae/logit-regression/
• HW06 Q5 Perform a logistic regression on the following
– https://www.kaggle.com/hidede/graduate-admissions/data
– This is an ongoing Kaggle competition (create a Kaggle account)
ITS 836
2
6.1.2 Model Description
Q1 Linear Regression Example
> income_input =
as.data.frame(read.csv(“income.csv”))
> income_input[1:10,]
Scatterplot
> summary(income_input)
Examine bottom line
income~age: strong + trend
income~educ: slight + trend
> library(lattice)
income~gender: no trend
> splom(~income_input[c(2:5)],
groups=NULL, data=income_input,
axis.line.tck=0,
axis.text.alpha=0)
ITS 836
3
6.1.2 Model Description
Example in R
•
•
•
–
linear relationship trends
lm(Income~Age+Education+Gender,income_input)
•
•
•
•
•
Residuals – uncertainty, sampling error
Small p-values indicate statistically
significance
Intercept: income of $7263 for newborn
female
Age coef: ~1, year age increase -> $1k
income incr
Educ coef: ~1.76, year educ + -> $1.76k
income +
Gender coef: ~-0.93, male income
decreases $930
Residuals – assumed to be normally
distributed – vary from -37 to +37 (more
information coming)
–
Age and Education highly significant,
p results2 summary(results) # results about same as before
•
•
Residual standard error / standard
deviation
R-squared (R2): variation of data
~64% (R2 = 1 means model explains data
perfectly)
•
ITS 836
F-statistic: tests entire model –p value is
small
4
6.1.2 Model Description
Confidence Intervals on the Parameters
• Once an acceptable linear model is
developed, it is often useful to draw
some inferences
– R provides confidence intervals using
confint() function
> confint(results2, level =
.95)
– For example, Education coefficient
was 1.76, and now the corresponding
95% confidence interval is (1.53. 1.99)
ITS 836
•
•
In the income example, the regression
line provides the expected income for a
given Age and Education
Using the predict() function in R, a
confidence interval on the expected
outcome can be obtained
> Age Education new_pt conf_int_pt conf_int_pt
– Expected income = $68699, conf interval
($67831,$69567)
5
>
6.1.3 Diagnostics
Evaluating the Residuals
• The error terms was assumed to be normally distributed with
zero mean and constant variance
> with(results2,{plot(fitted.values,residuals,ylim=c(-40,40)) })
ITS 836
6
>
6.1.3 Diagnostics
Evaluating the Normality Assumption
• The normality assumption still has to be validate
> hist(results2$residuals)
Residuals centered on
zero and appear
normally distributed
ITS 836
7
Questions?
ITS 836
8

Purchase answer to see full
attachment

Calculator

Calculate the price of your paper

Total price:$26

Need a better grade?
We've got you covered.

Order your paper