The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Calculate IQR of a column

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Ecke Posted - 09/25/2019 : 12:43:14 PM
Origin Version 2018b, Windows 7

Hi, I would like to calculate the inter qaurtile range (IQR) of a column and write the value in a cell above the column.
I can do it for the median by entering the following command in a "parameter" cell above the column:
= median(col(J))

Is there a similar command for the IQR or just the first and third quartile?

I would be glad if someone could help.

best
Eckart
4   L A T E S T    R E P L I E S    (Newest First)
Ecke Posted - 09/28/2019 : 06:44:37 AM
Thank you James!
I will see if I can get Version 2019b.
If not I will use the labtalk script

best
Eckart
YimingChen Posted - 09/26/2019 : 2:23:23 PM
Hi Echart,

You need to upgrade to 2019b to have full formula support in user defined parameter.

Or you can run Labtalk script to set longname as IQR:

for (int i = 1; i <= wks.nCols; i++)
{
	double dd = percentile(wcol(i),{75})-percentile(wcol(i),{25});
	wcol(i)[L]$ = $(dd);
}


James
Ecke Posted - 09/26/2019 : 12:21:50 PM
Hi James,
thank you for your answer. I tried entering the command and it did not fully work.
When I enter =percentile(This,{75}) it works but the subtraction of both terms "=percentile(This,{75})-percentile(This,{25})"doesn't give a result.

To give a bit more background. I want to plot a box plot and display the median and IQR for the different specimen series in the chart/legend below the box plot (see picture below). At the moment I calculate both values and write them in the cells above the data columns. If there was another way how to extract/display the data right out of the box plot, that would also be great.

YimingChen Posted - 09/25/2019 : 2:07:56 PM
Hi Eckart,

Please use this formula:
=percentile(This,{75})-percentile(This,{25})


James

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000