Pls anyone to provide advice on how to compute weighted interquartile range in Excel. I managed to compute weighted median but not sure how to do for weighted IQR
Thanks
Pls anyone to provide advice on how to compute weighted interquartile range in Excel. I managed to compute weighted median but not sure how to do for weighted IQR
Thanks
How did you compute the weighted median? According to this Wikipedia page (https://en.wikipedia.org/wiki/Weight...centile_method ), the weighted median is just a special case of the more general weighted percentile formula. I expect that you should be able to substitute something other than 50 or 0.5 (depending on the formula you used for weighted median) and get the desired weighted percentile (if I understand correct, the 25th and 75th percentile). Then compute your interquartile range.
Originally Posted by shg
@Shortly,
Thanks for the feedback.. I used a previous excel sheet that was shared on this platform. Pls see attached. It allows straight forward calculation of weighted median. In that the values are in one column and weight in another column. but cant figure out how to get the QI and Q3
The excel file in question was shared by gjlindn here https://www.excelforum.com/excel-pro...ed-median.html
Thanks
Do you understand how gjlindn's code? It looks like, rather than use the formula described by Wikipedia, his/her UDF simply makes a new array of "weight" copies of each "value". Then uses the built in WorksheetFunction.Median() function to derive the median. By simply changing WorksheetFunction.Median to WorksheetFunction.Percentile() or .Quartile(), you could return any quartile or percentile you wanted from the UDF.
shorty
Thanks much!... i am not able to do as described. Can you please populate this in the excel file and share? That will be very much appreaicted
Thanks
I am hesitant to "just do it for you" because this edit should be very simple. What have you tried, and what has happened with each attempt?
Here's a quick edit allowing you to see how to replace the .Median() function with either the .Quartile() function or the .Percentile() function:
Does that help you see how to use these functions in the UDF?![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks