How do I use dynamically calculated dimensions in fractile function?
Hi,
I have a list of patients who have different combinations of ailments(referred to as Variable_Key in my data) such cold, fever, hypertension and asthma. . Some take drug ID 16 and some take drug ID 17. Variable_Value of 1 indicates they have that ailment. I store this data as shown below. For example: Patient 1 has Asthma (because the variable value = 1), Cold (because the variable value = 1), Fever (because the variable value = 1) and Hypertenstion (because the variable value = 1). Patient 2 has only cold and fever.
I created a matrix shown as below to display how many patients have a particular combination. Now my requirement is: for each row, I don't want to count patients whose outcome value is less than 25th percentile of outcome value for the group of patients who represent that row. Because the dimensions are being calculated dynamically, I am unable to use fractile function to say that apply fractile function individually to each row and count patients whose outcome value > 25th percentile. Any ideas?