{"id":1063,"date":"2020-06-03T05:49:36","date_gmt":"2020-06-03T09:49:36","guid":{"rendered":"http:\/\/pressbooks.library.upei.ca\/montelpare\/?post_type=chapter&#038;p=1063"},"modified":"2020-08-24T14:19:01","modified_gmt":"2020-08-24T18:19:01","slug":"logistic-regression-analysis-using-proc-logistic","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.upei.ca\/montelpare\/chapter\/logistic-regression-analysis-using-proc-logistic\/","title":{"raw":"Logistic Regression Analysis using PROC LOGISTIC","rendered":"Logistic Regression Analysis using PROC LOGISTIC"},"content":{"raw":"<div class=\"textbox textbox--learning-objectives\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Learner Outcomes<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nAfter reading this chapter you should be able to:\r\n<ul>\r\n \t<li>Define and compute a logit<\/li>\r\n \t<li>Define and describe simple logistic regression<\/li>\r\n \t<li>Create a SAS program to compute the outcome for a logistic regression application<\/li>\r\n \t<li>Describe the use of logistic regression in evaluating the null hypothesis<\/li>\r\n \t<li>Identify the critical components in the output generated from a logistic regression application<\/li>\r\n \t<li>Determine if your study design is multi-level (hierarchical design) and how to use PROC GLIMMIX to account for this design in your analyses<\/li>\r\n<\/ul>\r\n<\/div>\r\n<\/div>\r\n<div>Introduction to Logistic Regression<\/div>\r\n&nbsp;\r\n\r\nConsider the application of logistic regression to be synonymous with the computation of ordered least squares regression (OLS) which we studied previously using Proc Reg and Proc GLM applications. However, the difference between these general linear model applications is that the dependent variable was a continuous variable. Conversely, in the use of logistic regression we are interested in evaluating a dependent variable that is binary and has outcome values limited to two possibilities (e.g. 0 or 1).\r\n\r\n&nbsp;\r\n\r\nMost often we apply the logistic regression approach when the dependent variable is binary or dichotomous. We can call this approach binary logistic regression. The dependent variable can take on one of two outcome values like yes or no, 0 or 1, success or failure.\r\n\r\n&nbsp;\r\n\r\nHowever, we can also use logistic regression to analyze data when the dependent variable has multiple categories, which we call multinomial logistic regression. In the case of multinomial logistic regression the dependent variable is categorical \u2013 presenting a discrete value in which there are more than two possible responses, as is the case in a multiple response categorical scale. The outcome measure can be a subjective value produced by a respondent, or it can result from arranging participants into specific groups or categories.\r\n\r\n&nbsp;\r\n\r\nFigure 15.1 presents an example of a binary logistic regression model in which the dependent variable has one of two outcome values: cancer positive or cancer negative, and an exposure variable: exposure to tobacco smoke, as shown here.\r\n\r\n&nbsp;\r\n<div><\/div>\r\n&nbsp;\r\n\r\nFigure 15.1 Example of a binary logistic regression model\r\n\r\n&nbsp;\r\n\r\nConsider the following data set for the model shown above.\r\n\r\n&nbsp;\r\n<div align=\"center\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><\/td>\r\n<td>\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>Table\u00a0of\u00a0cancer outcomes related to smoking<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>Smoker status<\/strong><\/td>\r\n<td><strong>Disease status: lung cancer<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Cancer<\/strong>\r\n\r\n<strong>positive<\/strong><\/td>\r\n<td><strong>Cancer<\/strong>\r\n\r\n<strong>negative<\/strong><\/td>\r\n<td><strong>Total<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Smoker<\/strong><\/td>\r\n<td>13<\/td>\r\n<td>20<\/td>\r\n<td>33<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Non-smoker<\/strong><\/td>\r\n<td>6<\/td>\r\n<td>41<\/td>\r\n<td>47<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Total<\/strong><\/td>\r\n<td>19<\/td>\r\n<td>61<\/td>\r\n<td>80<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n&nbsp;\r\n\r\nTable 15.1 Distribution of data for the nominal dependent variable cancer and the independent variable smoking status.\r\n\r\n&nbsp;\r\n\r\nIn studying linear regression analyses we discussed the computation of the coefficients that are used to adjust the x variables (independent measure(s) \u2013 here the measure is smoking status) as they influence the y variable (dependent measure). That is, we used simple linear regression and the PROC REG procedure to produce a slope score (the regression coefficient or parameter estimate) which acts on to produce () the outcome. \u00a0However, as we stated previously, in simple linear regression the dependent or outcome variable can take on any value from the real number line.\r\n\r\n&nbsp;\r\n\r\nIn logistic regression the measure of interest is a binary value (one of two possible outcomes) which is converted mathematically to a value ranging from 0 to 1 that we call a logit. The mathematical transformation of the binary outcome score to a logit value is computed using the following process.\r\n\r\n&nbsp;\r\n\r\n<em>Logit<\/em> =\r\n\r\n&nbsp;\r\n\r\nThe logit is used in the logistic regression procedure where the logit represents the dependent variable and is forecast by a linear combination of the predictor variables.\r\n\r\n&nbsp;","rendered":"<div class=\"textbox textbox--learning-objectives\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Learner Outcomes<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>After reading this chapter you should be able to:<\/p>\n<ul>\n<li>Define and compute a logit<\/li>\n<li>Define and describe simple logistic regression<\/li>\n<li>Create a SAS program to compute the outcome for a logistic regression application<\/li>\n<li>Describe the use of logistic regression in evaluating the null hypothesis<\/li>\n<li>Identify the critical components in the output generated from a logistic regression application<\/li>\n<li>Determine if your study design is multi-level (hierarchical design) and how to use PROC GLIMMIX to account for this design in your analyses<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div>Introduction to Logistic Regression<\/div>\n<p>&nbsp;<\/p>\n<p>Consider the application of logistic regression to be synonymous with the computation of ordered least squares regression (OLS) which we studied previously using Proc Reg and Proc GLM applications. However, the difference between these general linear model applications is that the dependent variable was a continuous variable. Conversely, in the use of logistic regression we are interested in evaluating a dependent variable that is binary and has outcome values limited to two possibilities (e.g. 0 or 1).<\/p>\n<p>&nbsp;<\/p>\n<p>Most often we apply the logistic regression approach when the dependent variable is binary or dichotomous. We can call this approach binary logistic regression. The dependent variable can take on one of two outcome values like yes or no, 0 or 1, success or failure.<\/p>\n<p>&nbsp;<\/p>\n<p>However, we can also use logistic regression to analyze data when the dependent variable has multiple categories, which we call multinomial logistic regression. In the case of multinomial logistic regression the dependent variable is categorical \u2013 presenting a discrete value in which there are more than two possible responses, as is the case in a multiple response categorical scale. The outcome measure can be a subjective value produced by a respondent, or it can result from arranging participants into specific groups or categories.<\/p>\n<p>&nbsp;<\/p>\n<p>Figure 15.1 presents an example of a binary logistic regression model in which the dependent variable has one of two outcome values: cancer positive or cancer negative, and an exposure variable: exposure to tobacco smoke, as shown here.<\/p>\n<p>&nbsp;<\/p>\n<div><\/div>\n<p>&nbsp;<\/p>\n<p>Figure 15.1 Example of a binary logistic regression model<\/p>\n<p>&nbsp;<\/p>\n<p>Consider the following data set for the model shown above.<\/p>\n<p>&nbsp;<\/p>\n<div style=\"margin: auto;\">\n<table>\n<tbody>\n<tr>\n<td><\/td>\n<td>\n<table>\n<thead>\n<tr>\n<td><strong>Table\u00a0of\u00a0cancer outcomes related to smoking<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Smoker status<\/strong><\/td>\n<td><strong>Disease status: lung cancer<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Cancer<\/strong><\/p>\n<p><strong>positive<\/strong><\/td>\n<td><strong>Cancer<\/strong><\/p>\n<p><strong>negative<\/strong><\/td>\n<td><strong>Total<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Smoker<\/strong><\/td>\n<td>13<\/td>\n<td>20<\/td>\n<td>33<\/td>\n<\/tr>\n<tr>\n<td><strong>Non-smoker<\/strong><\/td>\n<td>6<\/td>\n<td>41<\/td>\n<td>47<\/td>\n<\/tr>\n<tr>\n<td><strong>Total<\/strong><\/td>\n<td>19<\/td>\n<td>61<\/td>\n<td>80<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Table 15.1 Distribution of data for the nominal dependent variable cancer and the independent variable smoking status.<\/p>\n<p>&nbsp;<\/p>\n<p>In studying linear regression analyses we discussed the computation of the coefficients that are used to adjust the x variables (independent measure(s) \u2013 here the measure is smoking status) as they influence the y variable (dependent measure). That is, we used simple linear regression and the PROC REG procedure to produce a slope score (the regression coefficient or parameter estimate) which acts on to produce () the outcome. \u00a0However, as we stated previously, in simple linear regression the dependent or outcome variable can take on any value from the real number line.<\/p>\n<p>&nbsp;<\/p>\n<p>In logistic regression the measure of interest is a binary value (one of two possible outcomes) which is converted mathematically to a value ranging from 0 to 1 that we call a logit. The mathematical transformation of the binary outcome score to a logit value is computed using the following process.<\/p>\n<p>&nbsp;<\/p>\n<p><em>Logit<\/em> =<\/p>\n<p>&nbsp;<\/p>\n<p>The logit is used in the logistic regression procedure where the logit represents the dependent variable and is forecast by a linear combination of the predictor variables.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":56,"menu_order":8,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1063","chapter","type-chapter","status-publish","hentry"],"part":401,"_links":{"self":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/1063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/users\/56"}],"version-history":[{"count":1,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/1063\/revisions"}],"predecessor-version":[{"id":1064,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/1063\/revisions\/1064"}],"part":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/parts\/401"}],"metadata":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/1063\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/media?parent=1063"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapter-type?post=1063"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/contributor?post=1063"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/license?post=1063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}