Quantcast

ROC analysis in SPSS

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ROC analysis in SPSS

SM-16
Hi,
I need to run ROC analysis in SPSS but I am not sure how to do it. I
developed a questionnaire and would like to use ROC for cut-off points.
Could you give me an idea how to do it?

Thank you very much.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ROC analysis in SPSS

Steve Simon, P.Mean Consulting
SM wrote:

> I need to run ROC analysis in SPSS but I am not sure how to do it. I
> developed a questionnaire and would like to use ROC for cut-off points.
> Could you give me an idea how to do it?

I wrote about this back in 1999 for my old website. That example,
though, did not show the data layout or the SPSS dialog boxes. I've
added those to my new website at:

http://www.pmean.com/09/RocLayout.html

I hope this helps.
--
Steve Simon, Standard Disclaimer
Sign up for The Monthly Mean at www.pmean.com/news

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ROC analysis in SPSS

Reutter, Alex
Also see the online help.  From the ROC Curve dialog, click the Help button.  In the main help topic that comes up, click on the "Show me" link.  This takes you to tutorial-style material on the ROC Curve procedure, including a brief discussion of cutoffs.

Cheers,
Alex


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Steve Simon, P.Mean Consulting
Sent: Friday, October 16, 2009 3:58 PM
To: [hidden email]
Subject: Re: ROC analysis in SPSS

SM wrote:

> I need to run ROC analysis in SPSS but I am not sure how to do it. I
> developed a questionnaire and would like to use ROC for cut-off points.
> Could you give me an idea how to do it?

I wrote about this back in 1999 for my old website. That example,
though, did not show the data layout or the SPSS dialog boxes. I've
added those to my new website at:

http://www.pmean.com/09/RocLayout.html

I hope this helps.
--
Steve Simon, Standard Disclaimer
Sign up for The Monthly Mean at www.pmean.com/news

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Percentage display in Analyze / Frequencies

Mike Pritchard
Is there a way to show the frequencies from the Analyze Frequencies
procedure as percentages?  It is one extra step to go through so that they
display properly in my Powerpoint charts.   I can get the output from Custom
tables to show up properly, but not from Frequencies.

I suppose I should just use Custom Tables for everything.....

Thanks
Mike

_________________________________________________________________________
Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Percentage display in Analyze / Frequencies

John F Hall

Mike

I've always hoped SPSS would be able to do

freq varlist   /cel val   /tot n .      ... or similar

Maybe one day?

I did this by copying the original table to Word and then highlighting and deleting the freq and cumul columns: bit cumbersome, but it works.

   Q.24 Left or Right Politically     (Can't get rid of the blank lines below...)

 

 

 

 

 

Frequency

Percent

Valid Percent

Cumulative Percent

Valid

Left

5

3.5

9.4

9.4

2

15

10.6

28.3

37.7

3

14

9.9

26.4

64.2

4

14

9.9

26.4

90.6

5

3

2.1

5.7

96.2

Right

2

1.4

3.8

100.0

Total

53

37.3

100.0

 

Missing

-1

89

62.7

 

 

Total

142

100.0

 

 

 

 

 

 

Percent

Valid Percent

Valid

Left

3.5

9.4

 

2

10.6

28.3

 

3

9.9

26.4

 

4

9.9

26.4

 

5

2.1

5.7

 

Right

1.4

3.8

 

Total

37.3

100.0

Missing

-1

62.7

 

Total

100.0

 

 
I also tried highlighting the columns individually and copying, but that doesn't work.  However, it works if you highlight from the line above to the line below the table.
 

 

Percent

 3.5

10.6

9.9

9.9

2.1

1.4

37.3

62.7

100.0

 

 

Valid Percent

9.4

28.3

26.4

26.4

5.7

3.8

100.0

(n = 53) 

 

 

Only problem is you lose the base n for %.  Be nice if the base could automatically be displayed at the foot of the % column(s), but you could always add it in manually as above.  You can also adjust the column widths in Word:
 

 

Valid Percent

9.4

28.3

26.4

26.4

5.7

3.8

100.0

 

 

 

 
Is this what you were looking for?
 
John 
----- Original Message -----
Sent: Sunday, October 18, 2009 3:53 AM
Subject: Percentage display in Analyze / Frequencies


Is there a way to show the frequencies from the Analyze Frequencies
procedure as percentages?  It is one extra step to go through so that they
display properly in my Powerpoint charts.   I can get the output from Custom
tables to show up properly, but not from Frequencies.

I suppose I should just use Custom Tables for everything.....

Thanks
Mike

_________________________________________________________________________
Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Percentage display in Analyze / Frequencies

Art Kendall
The example below uses accidents.sav from SPSS's misnamed "samples" folder.

I  double clicked the table and highlighted and cut the parts that were not needed. Then exited the table editor.
Then I right clicked the table and exported the selection as a .html file so I could put it in this email. One can export the edited listing file in many ways.
Pivoting, formats, bolding, column widths, etc can be done in SPSS itself.

If this is something that will be done frequently, ctables and/or an autoscript to edit the tables, and/or a table look may be relevant.

 
GET
  FILE='C:\Program Files (x86)\SPSSInc\Statistics17\Samples\English\accidents.sav'.

DATASET ACTIVATE DataSet1.
FREQUENCIES VARIABLES=agecat.
 

Age category
  Percent Valid Percent
Under 21 33.3 33.3
21-25 33.3 33.3
26-30 33.3 33.3
Total 100.0 100.0

Art Kendall
Social Research Consultants

John F Hall wrote:

Mike

I've always hoped SPSS would be able to do

freq varlist   /cel val   /tot n .      ... or similar

Maybe one day?

I did this by copying the original table to Word and then highlighting and deleting the freq and cumul columns: bit cumbersome, but it works.

   Q.24 Left or Right Politically     (Can't get rid of the blank lines below...)

 

 

 

 

 

Frequency

Percent

Valid Percent

Cumulative Percent

Valid

Left

5

3.5

9.4

9.4

2

15

10.6

28.3

37.7

3

14

9.9

26.4

64.2

4

14

9.9

26.4

90.6

5

3

2.1

5.7

96.2

Right

2

1.4

3.8

100.0

Total

53

37.3

100.0

 

Missing

-1

89

62.7

 

 

Total

142

100.0

 

 

 

 

 

 

Percent

Valid Percent

Valid

Left

3.5

9.4

 

2

10.6

28.3

 

3

9.9

26.4

 

4

9.9

26.4

 

5

2.1

5.7

 

Right

1.4

3.8

 

Total

37.3

100.0

Missing

-1

62.7

 

Total

100.0

 

 
I also tried highlighting the columns individually and copying, but that doesn't work.  However, it works if you highlight from the line above to the line below the table.
 

 

Percent

 3.5

10.6

9.9

9.9

2.1

1.4

37.3

62.7

100.0

 

 

Valid Percent

9.4

28.3

26.4

26.4

5.7

3.8

100.0

(n = 53) 

 

 

Only problem is you lose the base n for %.  Be nice if the base could automatically be displayed at the foot of the % column(s), but you could always add it in manually as above.  You can also adjust the column widths in Word:
 

 

Valid Percent

9.4

28.3

26.4

26.4

5.7

3.8

100.0

 

 

 

 
Is this what you were looking for?
 
John 
----- Original Message -----
Sent: Sunday, October 18, 2009 3:53 AM
Subject: Percentage display in Analyze / Frequencies


Is there a way to show the frequencies from the Analyze Frequencies
procedure as percentages?  It is one extra step to go through so that they
display properly in my Powerpoint charts.   I can get the output from Custom
tables to show up properly, but not from Frequencies.

I suppose I should just use Custom Tables for everything.....

Thanks
Mike

_________________________________________________________________________
Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Percentage display in Analyze / Frequencies

Peck, Jon
In reply to this post by Mike Pritchard
If you just want to hide some of the output columns, you can use the HIDECOLS extension command or the more general SPSSINC MODIFY TABLES extension command.

Here's an example with MODIFY TABLES

FREQUENCIES VARIABLES=educ.
SPSSINC MODIFY TABLES subtype="Frequencies"
SELECT="Frequency" "Valid Percent" "Cumulative Percent"
 HIDE=TRUE.

The extension commands require the Python programmability plugin and can be downloaded from SPSS Developer Central, www.spss.com/devcentral.

SPSSINC MODIFY TABLES requires at leave V17.  HIDECOLS probably works with V16 as well.

Of course, Custom Tables gives more flexibility in exactly what appears in the table and how it is formatted.

HTH,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mike Pritchard
Sent: Saturday, October 17, 2009 7:54 PM
To: [hidden email]
Subject: [SPSSX-L] Percentage display in Analyze / Frequencies

Is there a way to show the frequencies from the Analyze Frequencies
procedure as percentages?  It is one extra step to go through so that they
display properly in my Powerpoint charts.   I can get the output from Custom
tables to show up properly, but not from Frequencies.

I suppose I should just use Custom Tables for everything.....

Thanks
Mike

_________________________________________________________________________
Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Percentage display in Analyze / Frequencies

Mike Pritchard
In reply to this post by Art Kendall

Sorry, I don’t think I was as clear as I should have been.

 

The output from Custom Tables can display percentages with the % sign.  But the output from the Tables command, although it displays percentages fine, doesn’t have the percentage sign.   Excel interprets the cells with the % sign correctly, but not surprisingly, just treats the cells without the % sign as numbers.  My process is to copy the output from SPSS to Excel to allow a little more manipulation (typically transposing, sometimes ordering) and then copying to Powerpoint chart builder for final clean up.  Unfortunately Powerpoint chartbuilder (at least my Office 2003 version), needs to have the percentage sign to display correctly – otherwise it shows as 100x.  So I have to do one more step in Excel.

 

I really don’t think what I’m looking for is available, so I don’t want to waste any more of list members’ time.  I have two options available – continue with an Excel step, or move to Custom Tables.

 

Thanks

Mike

 

_________________________________________________________________________
Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410


From: Art Kendall [mailto:[hidden email]]
Sent: Sunday, October 18, 2009 4:36 AM
To: John F Hall
Cc: [hidden email]; [hidden email]
Subject: Re: [SPSSX-L] Percentage display in Analyze / Frequencies

 

The example below uses accidents.sav from SPSS's misnamed "samples" folder.

I  double clicked the table and highlighted and cut the parts that were not needed. Then exited the table editor.
Then I right clicked the table and exported the selection as a .html file so I could put it in this email. One can export the edited listing file in many ways.
Pivoting, formats, bolding, column widths, etc can be done in SPSS itself.

If this is something that will be done frequently, ctables and/or an autoscript to edit the tables, and/or a table look may be relevant.

 
GET
  FILE='C:\Program Files (x86)\SPSSInc\Statistics17\Samples\English\accidents.sav'.

DATASET ACTIVATE DataSet1.
FREQUENCIES VARIABLES=agecat.
 

Age category

 

Percent

Valid Percent

Under 21

33.3

33.3

21-25

33.3

33.3

26-30

33.3

33.3

Total

100.0

100.0


Art Kendall
Social Research Consultants

John F Hall wrote:

Mike

I've always hoped SPSS would be able to do

freq varlist   /cel val   /tot n .      ... or similar

Maybe one day?

I did this by copying the original table to Word and then highlighting and deleting the freq and cumul columns: bit cumbersome, but it works.

   Q.24 Left or Right Politically     (Can't get rid of the blank lines below...)

 

Frequency

Percent

Valid Percent

Cumulative Percent

Valid

Left

5

3.5

9.4

9.4

2

15

10.6

28.3

37.7

 

3

14

9.9

26.4

64.2

4

14

9.9

26.4

90.6

 

5

3

2.1

5.7

96.2

 

Right

2

1.4

3.8

100.0

 

Total

53

37.3

100.0

 

Missing

-1

89

62.7

 

 

Total

142

100.0

 

 

 

 

 

 

Percent

Valid Percent

Valid

Left

3.5

9.4

 

2

10.6

28.3

 

3

9.9

26.4

 

4

9.9

26.4

 

5

2.1

5.7

 

Right

1.4

3.8

 

Total

37.3

100.0

Missing

-1

62.7

 

Total

100.0

 

 

I also tried highlighting the columns individually and copying, but that doesn't work.  However, it works if you highlight from the line above to the line below the table.

 

 

Percent

 3.5

10.6

9.9

9.9

2.1

1.4

37.3

62.7

100.0

 

 

Valid Percent

9.4

28.3

26.4

26.4

5.7

3.8

100.0

(n = 53) 

 

 

Only problem is you lose the base n for %.  Be nice if the base could automatically be displayed at the foot of the % column(s), but you could always add it in manually as above.  You can also adjust the column widths in Word:

 

 

Valid Percent

9.4

28.3

26.4

26.4

5.7

3.8

100.0

 

 

 

 

Is this what you were looking for?

 

John 

----- Original Message -----

Sent: Sunday, October 18, 2009 3:53 AM

Subject: Percentage display in Analyze / Frequencies

 


Is there a way to show the frequencies from the Analyze Frequencies
procedure as percentages?  It is one extra step to go through so that they
display properly in my Powerpoint charts.   I can get the output from Custom
tables to show up properly, but not from Frequencies.

I suppose I should just use Custom Tables for everything.....

Thanks
Mike

_________________________________________________________________________
Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Percentage display in Analyze / Frequencies

Peck, Jon

Custom tables, of course, gives you great control over the formats, but if all you need to do is to set the cell formats in the percentage columns to a percent format, that is easily done with the SPSSINC MODIFY TABLES extension command.  Here’s an example of that

FREQUENCIES VARIABLES=educ.

SPSSINC MODIFY TABLES subtype="'Frequencies'"

SELECT= "Percent" "Valid Percent" "Cumulative Percent"

/styles customfunction=

"customstylefunctions.SetNumericFormatAndDecimals(format='##.#%',decimals=1)".

 

This selects the three columns that contain percentages and applies the percentage format to each, setting one decimal place.

 

Any of the formats you see in the pivot table editor cell formats panel can be used as the format parameter here.  This requires version 1.4.1 of this extension command.

 

This command can also transpose the table if you are interested in that.

 

HTH,

Jon Peck

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mike Pritchard
Sent: Sunday, October 18, 2009 11:13 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Percentage display in Analyze / Frequencies

 

Sorry, I don’t think I was as clear as I should have been.

 

The output from Custom Tables can display percentages with the % sign.  But the output from the Tables command, although it displays percentages fine, doesn’t have the percentage sign.   Excel interprets the cells with the % sign correctly, but not surprisingly, just treats the cells without the % sign as numbers.  My process is to copy the output from SPSS to Excel to allow a little more manipulation (typically transposing, sometimes ordering) and then copying to Powerpoint chart builder for final clean up.  Unfortunately Powerpoint chartbuilder (at least my Office 2003 version), needs to have the percentage sign to display correctly – otherwise it shows as 100x.  So I have to do one more step in Excel.

 

I really don’t think what I’m looking for is available, so I don’t want to waste any more of list members’ time.  I have two options available – continue with an Excel step, or move to Custom Tables.

 

Thanks

Mike

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Percentage display in Analyze / Frequencies

Mike Pritchard

Thanks!   I hadn’t explored the extensions, but you gave me a reason to check them out.  Unfortunately, this one needs SPSS V17.   I’m currently using V16.  Yet another reason to upgrade….

 

Mike Pritchard

 




From: Peck, Jon [mailto:[hidden email]]
Sent: Sunday, October 18, 2009 2:37 PM
To: Mike Pritchard; [hidden email]
Subject: RE: Re: [SPSSX-L] Percentage display in Analyze / Frequencies

 

Custom tables, of course, gives you great control over the formats, but if all you need to do is to set the cell formats in the percentage columns to a percent format, that is easily done with the SPSSINC MODIFY TABLES extension command.  Here’s an example of that

FREQUENCIES VARIABLES=educ.

SPSSINC MODIFY TABLES subtype="'Frequencies'"

SELECT= "Percent" "Valid Percent" "Cumulative Percent"

/styles customfunction=

"customstylefunctions.SetNumericFormatAndDecimals(format='##.#%',decimals=1)".

 

This selects the three columns that contain percentages and applies the percentage format to each, setting one decimal place.

 

Any of the formats you see in the pivot table editor cell formats panel can be used as the format parameter here.  This requires version 1.4.1 of this extension command.

 

This command can also transpose the table if you are interested in that.

 

HTH,

Jon Peck

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mike Pritchard
Sent: Sunday, October 18, 2009 11:13 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Percentage display in Analyze / Frequencies

 

Sorry, I don’t think I was as clear as I should have been.

 

The output from Custom Tables can display percentages with the % sign.  But the output from the Tables command, although it displays percentages fine, doesn’t have the percentage sign.   Excel interprets the cells with the % sign correctly, but not surprisingly, just treats the cells without the % sign as numbers.  My process is to copy the output from SPSS to Excel to allow a little more manipulation (typically transposing, sometimes ordering) and then copying to Powerpoint chart builder for final clean up.  Unfortunately Powerpoint chartbuilder (at least my Office 2003 version), needs to have the percentage sign to display correctly – otherwise it shows as 100x.  So I have to do one more step in Excel.

 

I really don’t think what I’m looking for is available, so I don’t want to waste any more of list members’ time.  I have two options available – continue with an Excel step, or move to Custom Tables.

 

Thanks

Mike

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: adjusted means

Kim Jinnett
In reply to this post by SM-16
Hi all,

I'm not sure of the syntax for adjusted means EEMEANS.

I have an OUTCOME and need its mean for each level of VARX1 adjusted for
VARX2.  VARX1 and VARX2 are dummy variables.

Thanks,
Kim

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: encryption

Kim Jinnett
In reply to this post by SM-16
Are encryption options (SSL, other?) standard in SPSS version 14?  If
so, how might I find them.  If not, what is available?

Thanks,
Kim

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Loading...