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…
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
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.