14.03.2014 Views

Modeling and Multivariate Methods - SAS

Modeling and Multivariate Methods - SAS

Modeling and Multivariate Methods - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

226 Performing Logistic Regression on Nominal <strong>and</strong> Ordinal Responses Chapter 7<br />

Stacking Counts in Multiple Columns<br />

Stacking Counts in Multiple Columns<br />

Data that are frequencies (counts) listed in several columns of your data table are not the form that you need<br />

for logistic regression. For example, the Ingots2.jmp data table in the data folder (see Figure 7.26) has<br />

columns Nready <strong>and</strong> Nnotready that give the number of ready <strong>and</strong> number of not ready ingots for each<br />

combination of Heat <strong>and</strong> Soak values. To do a logistic regression, you need the data organized like the table<br />

in Figure 7.27.<br />

To make a new table, suitable for logistic regression, select the Stack comm<strong>and</strong> from the Tables menu.<br />

Complete the Stack dialog by choosing Nready <strong>and</strong> NNotReady as the columns to stack, <strong>and</strong> then click OK<br />

in the Stack dialog. This creates the new table in Figure 7.27. If you use the default column names, Label is<br />

the response (Y) column <strong>and</strong> Data is the frequency column.<br />

The example in the section “Introduction to Logistic Models” on page 199, shows a logistic regression using<br />

a sample data table Ingots.jmp. It has a frequency column called count (equivalent to the Data column in<br />

the table below) <strong>and</strong> a response variable called Ready, with values 1 to represent ingots that are ready <strong>and</strong> 0<br />

for not ready.<br />

Figure 7.26 Original Data Table

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!