Questions tagged [iqr]

IQR stands for "Interquartile range" in statistics.

Interquartile range (statistics) equals to the difference between the third and first quartiles. A really nice alternative to show dispersion instead of standard deviation.

This descriptive statistic could be familiar from boxplots.

75 questions
0
votes
1 answer

How to filter columns of a matrix whose IQR is below a specific value?

filter <- apply(expressionMatrix, 2, function (x) (colIQRs(x, na.rm = TRUE) < 1.6)) "Argument x is of class numeric, should be a matrix" error was thrown. How to cope with that? I think logically this code is correct: I remove all columns, whose IQR…
mercury0114
  • 1,341
  • 2
  • 15
  • 29
0
votes
0 answers

Finding outliers in an array: how can I get my function to output the outliers using IQR method?

I am trying to get my function to output the outlier in the array "data." I have created a graph to show the outlier, however I want my function to spit out the actual value also. Basically I want the value '220' to be outputted in my code. How can…
Hana
  • 1
0
votes
0 answers

Inconsistent Whiskers upper distance with 1.5 IQR

Same data, using two different boxplot methods provide two different length for the Whiskers, I understand that the whisker only goes as far as the maximum (minimum) point less (greater) than the upper (lower) fence value. In my case they are…
ecolog
  • 78
  • 7
0
votes
1 answer

Get one table statistics (max, min, IQR, ...) for a list of data frames in R

I have a few data frames. I need to display basic statistics together with interquartile range (IQR) in one table for all of them. Unfortunately, summary function does not return IQR. On the other hand, fivenum returns IQR, but cannot (?) be…
matandked
  • 1,527
  • 4
  • 26
  • 51
0
votes
2 answers

Plotting Quantiles values of boxplot in R inside a for loop

Suppose I have a data frame airquality. I made a for loop to plot all the boxplot of the air-quality data set. name <- names(airquality) classes<-sapply(airquality,class) airquality[is.na(airquality)] <- 0 for (name in name[classes ==…
learner
  • 828
  • 2
  • 19
  • 36
0
votes
0 answers

Difference between quantile results and iqr

I'm trying to understand a little more about how Octave calculates quartiles and interquartile range. Consider the following: A=[1 4 7 10 14]; quantile(A, [0.25 0.75]) ans = 3.2500 11.0000 This result seems consistent with Method 3 on the…
Michael McMullin
  • 1,450
  • 1
  • 14
  • 25
0
votes
1 answer

Fewer outliers detected using boxplot

I want to determine outliers in a data frame using quantiles and 1.5*IQR. I have used the boxplot function and compared the resulting outliers to the ones computed using quantiles and iqr. I am noticing a difference between the two methods. The…
alaj
  • 187
  • 1
  • 10
0
votes
1 answer

Bug in my brain or in pyplot? Whiskers in boxplot with iqr zero

Using x = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,-10] matplotlib.pyplot.boxplot(x) plots the following: Where the whiskers are invisible at -10 and 10. The definition according to the documentation however states that the whiskers are at Q1-1.5 *…
trevore
  • 425
  • 2
  • 10
-1
votes
1 answer

Is there a way to get Python to print out specific values in a data set that meet a certain requirement

I want Python to only print the values that are larger than a certain value out of a dataset. q1 is a variable representing the 25th percentile, q3 is a variable representing the 75th percentile, iqr represents the function q3-q1. #Finding Outliers …
-1
votes
1 answer

Can I remove outliers from all columns in my dataframe R?

I have a data frame with 431 variables and 140 observations and I need to remove outliers. However this dataset has several NA values, and I do not want to remove all rows with NAs. I am trying to do this outlier removal by IQR method, and so far,…
Nat23
  • 3
  • 1
-1
votes
1 answer

how to select a statistical range in an excel

I've got an array of a lot of numbers. These are daily readings over a 4 month period. Each row represents a different device. I need to calculate the trendline and ignore the outliers. I tried calculating the IQR, then the range, and then filtering…
-1
votes
2 answers

how to write a loop for finding median across columns

I have a dataframe regarding kidney transplant patients with different clinical outcomes (numbers changed for confidentiality purposes. In other words I have something like this. Patient eGFR1m cr1m alb1m cr3m eGFR3m alb3m cr12m…
han
  • 17
  • 4
-1
votes
1 answer

How .scale_ is calculated by sklearn in python? (What is it's algorithm exactly?)

Please, suppose that we have an array like this: import numpy as np X_train = np.array([[ 1., -1., 2.], [ 2., 0., 0.], [ 0., 1., -1.]]) We scale it with .scale_ existed in sklearn by this code: from…
Hamed Baziyad
  • 1,954
  • 5
  • 27
  • 40
-1
votes
1 answer

applying iqr filter on all columns in R using dplyr

filtering data of all columns between their IQRs. Tried using filter_all(df_name,IQR(.)), returns the same dataframe
Aneesh
  • 15
  • 1
  • 3
-1
votes
1 answer

Finding Median of Multiple Boxes in a Boxplot

I am newbie in R and could not find the answer to my question anywhere. I have a dataset for which I have created a boxplot. I grouped the age variable into 5 groups so that the boxplot would appear nicer and more coherent, but I cannot figure out…
1 2 3 4
5