Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
schreiberj
Level I

Creating Categorical Variable

I am trying to create a categorical variable (a third variable) from two categorical variables.

Thanks...

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Creating Categorical Variable

Your request is quite vague in what the new column is supposed to contain, so I will assume you want to concatenate the two columns together.  To do this, 

  1. Move your cursor to the column header you want the new column to be created next to and right click and select "Insert Column"
  2. Right click on the new column's header, and select "Column Info"
  3. In the Column Info window, type in your new column's name and change the Modeling Type to Character.
  4. Click on OK
  5. Once again place right click on the new column's header and select "Formula"
  6. Click on the first column name of the two columns you want to be concatenated.
  7. Now click on the Character category on the left column of the window, and select "Concat"
  8. Click on the second column name of the two columns you want to be concatenated
  9. The JMP Formula Builder should now have built a formula that looks something like
    firstcolname || secondcolname
  10. Click on OK and the formula will be applied to the new column

I strongly suggest that you go through the Discovering JMP and Using JMP documents from the JMP Documentation Library

     Help==>JMP Documentation Library

Jim

View solution in original post

1 REPLY 1
Highlighted
txnelson
Super User

Re: Creating Categorical Variable

Your request is quite vague in what the new column is supposed to contain, so I will assume you want to concatenate the two columns together.  To do this, 

  1. Move your cursor to the column header you want the new column to be created next to and right click and select "Insert Column"
  2. Right click on the new column's header, and select "Column Info"
  3. In the Column Info window, type in your new column's name and change the Modeling Type to Character.
  4. Click on OK
  5. Once again place right click on the new column's header and select "Formula"
  6. Click on the first column name of the two columns you want to be concatenated.
  7. Now click on the Character category on the left column of the window, and select "Concat"
  8. Click on the second column name of the two columns you want to be concatenated
  9. The JMP Formula Builder should now have built a formula that looks something like
    firstcolname || secondcolname
  10. Click on OK and the formula will be applied to the new column

I strongly suggest that you go through the Discovering JMP and Using JMP documents from the JMP Documentation Library

     Help==>JMP Documentation Library

Jim

View solution in original post

Article Labels