- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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 :
But doesn't work ...
Here the result I'm trying to have :
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 ++++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Double condition (if)
Here the solution, it works.
Thank you Craige !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.