cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Unused levels appearing in Odds Ratio output after recoding a categorical variable in JMP

After recoding a categorical variable (either with 'recode' or If) in JMP 18 pro, the old category “Either” still appears in the results — especially in the Odds Ratio output of a logistic regression — even though no rows in the new column contain that value anymore.

It seems JMP continues to recognize “Either” as an existing level of the variable, and there is no visible option to actually delete or remove it from the column properties.

How can I completely remove or drop this unused category so that it no longer appears in the analysis output?

 

formula ex. 

If( :Preferred drainage == "1",
"0",
If( :Preferred drainage == "2",
"1",
""
)
)
2 REPLIES 2
Thierry_S
Super User

Re: Unused levels appearing in Odds Ratio output after recoding a categorical variable in JMP

Hello,

I am not 100% sure of what you are asking, but your nested If statement seems odd (I speculate that you may not need the second If statement). 

Is the formula below what you are trying to achieve?

If (:Preferred drainage == "1", "0", :Preferred drainage == "2", "1", "");

Assuming that all the values in the Preferred Drainage column are 1 or 2, you should not have empty (i.e., "") results from your formula.

Let us know.

Best

TS

Thierry R. Sornasse

Re: Unused levels appearing in Odds Ratio output after recoding a categorical variable in JMP

Hi TS — Thanks for your reply.

quick clarification:

The original column is character with Value Labels:

1="Stent", 2="Nephrostomy", 3="Either".

I created a new binary column with the nested formula and using 'recode'

  • Rows with the original value 3 become "" and I exclude them from the model.
  • I run logistic regression on the new column only (event = "1").
    Yet, in the Odds Ratio report I still see comparisons that reference "Either" as if a third level exists.

Could Value Labels from the original column be carried over somehow to the new column (or into the platform), causing “Either” to appear in the OR report?
What’s the correct way to ensure the OR output only reflects the two levels and does not list “Either”?

Recommended Articles