1
votes

I use SPSS v25 to build ROC. I have DataSet with the following data:

Case# Dosage  Result
1       DosagA  healthy
2       DosagA  sick
3       DosagB  sick
4       DosageC healthy
....

To analyse Using ROC, I encoded Result as: Healty =1, sick =0

Case# Dosage  Result
1       DosagA  1
2       DosagA  0
2       DosagB  0
4       DosageC 1
....

When trying to build ROC with: Test Variable= result, State variable= Dosage

I get error message:

String Variable are not allowed in the list

Do I have to Encode Dosage with numeric values like:

Case# Dosage  Result
1       1  1
2       1  0
2       2  0
4       3  1
...

Or What is the best solution for ROC Curve using categorical variables (nominal)?

1
just to make sure - after recoding a variable like result to "0", "1", you realize it is still a string variable, you need to change it into a numeric variable? If you didn't, you can use this: alter type Result (f1). - eli-k
Result variable is numeric and Dosage is string. - M.Hassan
Cross-posting is generally considered bad etiquette and discouraged on this site stats.stackexchange.com/q/491314/36682 - Calimo
@Calimo, the question is deleted on the other site. - M.Hassan

1 Answers

0
votes

The prediction needs to be numeric. The ROC curve gives sensitivity vs. 1 - specificity for different cut points on a predictor, whether that's a single predictor or a score based on something like a logistic regression.