cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Mart-in
Level III

Double condition (if)

Hello, 

 

I have a data set with two randomization (code 1 or 2) arm and 5 types (1,2...,5) of interventions and my interest variable is a scale pain (1,... to 10).

 

How can I make a khi2 test analysis between the two arm and my scale pain for 1 of the five intervention.

 

I create a new variable "Chir Abdo - Rando" with formula to make analysis X,Y "Chir Abdo - Rando" in function "EVA <4".

 

For example I begin (but whithout succeded) like this :

 

Mart-in_0-1612351107889.png

 

But doesn't work ...

 

Here the result I'm trying to have :

 

 

Mart-in_1-1612351180231.png

 

You can find my data base attached. There is color in regard of the mentionned variables.

 

"Bras prise en charge habituelle = variable "Groupe randomisation" = 1

"Bras "toucher-détente" = "Groupe randomisation" = 2

"EVA < 4" = variable "EVA < 4" = 1

"EVA > or = 4" = "EVA < 4" with code = 0

 

Thank you ++++

4 REPLIES 4
Craige_Hales
Super User

Re: Double condition (if)

Maybe something like this?

if (
     intervention == 1 & random == 1 , 1, // a test, and an answer for the test
     intervention == 1 & random != 0 , 2, // another test, and an answer
     0  // if none of the previous tests, use this answer
)

If Secrets might help too. Watch out for missing values.

 

Craige
Mart-in
Level III

Re: Double condition (if)

Mart-in_0-1612355930703.png

 

Here the solution, it works.

 

Thank you Craige !

Craige_Hales
Super User

Re: Double condition (if)

Great! 

Make sure the answer is correct when intervention is not 1. The picture is missing a value for the last else.

Craige
Mart-in
Level III

Re: Double condition (if)

It is only if I leave a value for what else that it work.

 

I don't want to take in account the other type of (chirurgical) intervention, and no attribute values, to make a khi2 test only on the sub saple of patients who underwent abdominal surgery.