I am fairly new to excel and many thanks to all the people who have helped me so far. I wonder if somebody would be kind enough to take a look at this problem. If I can figure out the concepts behind this, I should be able to apply this to many other problems!
***********************************************
1.)
I want to calculate a correlation coefficient (r) between two data variables, x and y in two columns.
r = Sum(x - mean x)(y - mean y) / SQRT( sum(x - mean x)^2 * sum(y - mean y)^2)
I can laboriously calculate this having extra columns for (x - mean x) and (y - mean y)^2 etc. However is there a quicker and neater way of doing this with a formula in one cell?
***********************************************
2.) The problem however is more complex:
Assume variables x and y are in columns A and B.
I only want this formulae applied to patients which register as "M" (male) in column C and a particular drug eg. "Etanercept" in column D.
If data is missing in column A or B and is left blank, I want it ignored from calculations.
Is this possible to do? Is so would you be most kind to post a solution to problem 1 and 2 so I can unpick the formulae are learn so I don't have to bother people again.
Many thanks
Andrew
Bookmarks