Mahrita.Harahap@uts.edu.au Maths Study Centre CB04.03.331 Open 11am – 5pm Semester Weekdays Check...

Preview:

Citation preview

Regression Analysis: Lab 9 Logistic RegressionMahrita.Harahap@uts.edu.auMaths Study Centre CB04.03.331 Open 11am – 5pm Semester Weekdays Check out www.khanacademy.org This presentation can be found at:www.mahritaharahap.wordpress.com/teaching-areas/

Marking Scheme: 0 if less than 50% attempted, 1 for more than 50% attempted but less than 50% correct, 2 if more than 50% correct.

A) Testing for Association between two variables:Ho: No association between the two variables (in the population) so any pattern we see is just due to random variation. Ha: An association exists between the two variables (in the population).Test Stat:

If X2 > X2(rows-1)×(columns-1) , this means p-value<α, so we do

reject the null hypothesis. We have enough statistical evidence to prove an association exists between the two variables

FEEDBACK FOR LAB 8

B), C), D) and E)

F) Testing for Association between two variables:Ho: No association between the two variables (in the population) so any pattern we see is just due to random variation. Ha: An association exists between the two variables (in the population).Test Stat:

If X2 > X2(rows-1)×(columns-1) , this means p-value<α, so we do

reject the null hypothesis. We have enough statistical evidence to prove an association exists between the two variables

F), G) and H)

Lab 9: Logistic Regressionyi=α+β1x1i+….+βpxpi+εi εi~N(0,σ)

When the response variable y is not a continuous random variable but a categorical random response variable, the normal linear regression model becomes inappropriate because the random errors are no longer normally distributed. Therefore, we need to use logistic regression, which deals with this type of data for the response variable. Suppose the response variable y takes only two possible values, 1 and 0 (to denote success or failure for example):Then p=P(y=1)=probability of belonging to group 1 (e.g. success group) so 1-p=P(y=0)=probability of belonging to group 0

In order to do regression on a categorical response variable, we need to do a transformation of p to the whole real line i.e. g:[0,1]->(-∞,∞), using a link function called logit link ), hence which is why this is called logistic regression.

This is the transformation model:

and the inverse of the transformation model gives

which gives the logistic regression model:==probability of belonging to group 1

A)

B)log (𝑜𝑑𝑑𝑠 )=𝜂=α+β1 x1 i ¿−48.909+1.313(𝐺𝐴𝐺𝐸)

C)H0: Odds Ratio=1Ha: Odds Ratio≠1

Use the confidence interval to answer this question. Is 1 a possible value for the population odds ratio?

E)

F)

log (𝑜𝑑𝑑𝑠 )=𝜂=α+β1 x1 i=−1.033+0.835(𝑆𝐸𝑋 )

Recommended