Because we break the linearity This curve has the following form when the assumption the usual hypothesis testing parameter b, is positive, or its mirror image when the parameter is negative procedures are invali R square tends to be very low. The fit of the line is poor because the response can only be 0 or 1 so the values do not cluster around the line 98=653210 Logistic Regression Logistic Function To get around both problems, we will The logistic curve has the property that it instead fit a curve of a particular form to never takes values less than zero or greater the data. This type of curve, known as a than one. The way to fit it is to transform the logistic curve, has the following general definition of the logistic curve given above into a linear form P=exp(bo+b, X)(1+exp(bo+b, X) loge(p/(1-p)=bo+b,'X The function on the left-hand side of this where p is the proportion at each value of equation has various names, of which the the explanatory variable X, bo and b,are most common are the logistic function ' and numerical constants to be estimated and the log-odds function. The log equatior exp is the exponential function has the general form of a linear model7 13 • Because we break the linearity assumption the usual hypothesis testing procedures are invalid. • R square tends to be very low. The fit of the line is poor because the response can only be 0 or 1 so the values do not cluster around the line. 14 Logistic Regression • To get around both problems, we will instead fit a curve of a particular form to the data. This type of curve, known as a logistic curve, has the following general form: P = exp(b0+b1*X)/(1+exp(b0+b1*X)) where p is the proportion at each value of the explanatory variable X, b0 and b1 are numerical constants to be estimated, and exp is the exponential function. 8 15 • This curve has the following form when the parameter b1 is positive, or its mirror image when the parameter is negative. 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 16 Logistic Function • The logistic curve has the property that it never takes values less than zero or greater than one. The way to fit it is to transform the definition of the logistic curve given above into a linear form: loge(p/(1-p)) = b0+b1*X • The function on the left-hand side of this equation has various names, of which the most common are the 'logistic function' and the 'log-odds function'. The log equation has the general form of a linear model