Displaying 20 results from an estimated 117 matches for "iqrs".
Did you mean:
inrs
2009 Sep 08
2
strange results in summary and IQR functions
Dear R users,
Something is strange in summary and IQR. Suppose, I have a data set and I
would like to find the Q1, Q2, Q3 and IQR.
x<-c(2,4,11,12,13,15,31,31,37,47)
> summary(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
2.00 11.25 14.00 20.30 31.00 47.00
> IQR(x)
[1] 19.75
However, I test the same data set in SAS "proc univariate", and SAS shows
that
2012 Nov 23
6
Summary statistics for matrix columns
Hi,
is there a way I can calculate a summary statistics for a columns matrix
let say we have this matrix
x <- matrix(sample(1:8000),nrow=100)
colnames(x)<- paste("Col",1:ncol(x),sep="")
if I used summary
summary(x)
i get the output for each column but I need the output to be in matrix with
rownames and all the columns beside it
this how I want it
2011 Apr 17
3
Box plot with 5th and 95th percentiles instead of 1.5 * IQR: problems implementing an existing solution...
Hi all,
I'm just getting started with R and I would appreciate some help. I'm having
trouble creating a boxplot with whiskers at the 95th and 5th percentiles
instead of at 1.5 * IQR. I have read the relevant documentation, and checked
existing mails on this topic. I found a small modification that should work
: https://stat.ethz.ch/pipermail/r-help/2001-November/016817.html and tried
to
2010 Dec 12
1
95% CI of a IQR and more
Hi guys!
I have to calculate the 95% CI for the IQR. I have 100samples with
continuous numbers using a compute-intensive method.
1)I can calculate the 95%CI and the IQR, but I don't know how to calculate
the CI of the IQR, does anybody have any idea, which method will be
appropriate?
2)I have a 2x2 table with gender vs blue eyes or not. How do I calculate the
expected two-by-two contingency
2009 Mar 30
1
quantile and IQR do not check for numeric input (PR#13631)
This report follows the post
http://tolstoy.newcastle.edu.au/R/e6/devel/09/03/0760.html
where it is shown that quantile() and IQR() do not work as documented.
In fact they do not check for numeric input even if the documentation says =
:
?quantile
x numeric vectors whose sample quantiles are wanted. Missing
values are ignored.
?IQR
x a numeric vector.
> quantile(factor(1:9))
0%
2009 Mar 05
1
quantile(), IQR() and median() for factors
Dear all,
from the help page of quantile:
"x ??? numeric vectors whose sample quantiles are wanted. Missing
values are ignored."
from the help page of IQR:
"x ??? a numeric vector."
as a matter of facts it seems that both quantile() and IQR() do not
check for the presence of a numeric input.
See the following:
set.seed(11)
x <- rbinom(n=11,size=2,prob=.5)
x <-
2010 May 07
1
How to pass value to an argument in a function which is an argument to the main function
Dear all,
I constructed this function called my.boxplot.stats by replacing fivnum()
with quantile() in function boxplot.stats(). So I can try different quantile
methods in bwplot(). The problem is I couldn't pass different values to the
"type" argument to my.boxplot.stats, which in turn is an argument in
bwplot(). Now I just have to manually change the "type" value in
2009 Mar 04
3
problems with exporting a chart
Dear R helpers,
I have a problem with exporting a chart (to any format). The graphic device becomes inactive and I get the 'Error: invalid graphics state' error message. I searched the help, web and FAQ but couldn't find the solution.
This is my code:
I chart a histogram for differences in R2 by sample size (an extract from the data is below). Altogether I have n=2500 observations
2016 Apr 19
5
Interquartile Range
That didn't work Jim!
Thanks anyway
On Mon, Apr 18, 2016 at 9:02 PM, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi Michael,
> At a guess, try this:
>
> iqr<-function(x) {
> return(paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
> }
>
> .col3_Range=iqr(datat$tenure)
>
> Jim
>
>
>
> On Tue, Apr 19, 2016 at
2016 Apr 19
0
Interquartile Range
Are you aware that there *already is* a function that does this?
?IQR
(also your "function" iqr" is just a character string and would have
to be parsed and evaluated to become a function. But this is a
TERRIBLE way to do things in R as it completely circumvents R's
central functional programming paradigm).
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind
2003 Mar 01
2
density(), with argument of length 1 (PR#2593)
The following is from version 1.6.2 of R under Windows,
or 1.6.1 under Mac OSX/X11
> density(1)
Error in if (!(lo <- min(hi, IQR(x)/1.34))) (lo <- hi) || (lo <- abs(x[1])) || :
missing value where logical needed
I am not sure how this should be handled. I encountered it
in connection with densityplot(). In that connection, it
might be enough to modify density() so that it
2010 May 12
8
function
Dear list,
I'm trying to implement the following function, but what I get is an error message and I don't understand where is the error:
#outliers'identification:
iqr=lapply(bb,function(){
inner_fencesl=quantile(x,0.25)-1.5*IQR(x)
inner_fencesh=quantile(x,0.75)+1.5*IQR(x)
outer_fencesl=quantile(x,0.25)-3*IQR(x)
outer_fencesh=quantile(x,0.75)+3*IQR(x)})
where bb is a dataframe
2016 Apr 20
2
Interquartile Range
Again, IQR returns two both a .25 and a .75 value and it failed, which is
why I didn't use it before. Also, the first function just returns tha same
value repeating. Since they are the same, before the second call, using
the mode function is just a way to grab one value. I could have used
average, min, max, they all would have returned the same thing.
Mike
On Tue, Apr 19, 2016 at 7:24 PM,
2016 Apr 20
0
Interquartile Range
???
IQR returns a single number.
> IQR(rnorm(10))
[1] 1.090168
To your 2nd response:
"I could have used average, min, max, they all would have returned the
same thing., "
I can only respond: huh?? Are all your values identical?
You really need to provide a small reproducible example as requested
by the posting guide -- I certainly don't get it, and I'm done
guessing.
2011 Feb 24
1
Boxplot not doing what I think it should
My box plot below is drawing its upper whisker all the way to the last point, instead of showing the point as an outlier. Am I misunderstanding, or is it a bug?
Help(boxplot) states for the parameter ?range? that ?this determines how far the plot whiskers extend out from the box. If range is positive, the whiskers extend to the most extreme data point which is no more than range times the
2016 Apr 19
0
Interquartile Range
> That didn't work Jim!
It always helps to say how the suggestion did not work. Jim's
function had a typo in it - was that the problem? Or did you not
change the call to ddply to use that function. Here is something
that might "work" for you:
library(plyr)
data <- data.frame(groupColumn=rep(1:5,1:5), col1=2^(0:14))
myIqr <- function(x) {
2010 Jun 04
1
Boxplot: what is shown by default?
hi,
i'm using /"boxplot()"/ to show some data:
x <- c(0.99, 0.97, 0.91, 0.72, 1.00, 0.99, 1.02, 0.90, 0.91, 0.90, 1.02,
0.90, 1.35, 1.01, 0.92)
boxplot(x)
is it correct when i say: /"Boxes represent interquartile ranges (IQRs);
bold horizontal lines, medians; whiskers, lowest and highest values
still within 1.5 x IQR; open circles, outliers."?
/thanks in advance for any help!
cheers, tom
human genetics, bern/
/
[[alternative HTML version deleted]]
2007 Feb 22
1
Diagnostic Tests: Jarque-Bera Test / RAMSEY
Hello R-Users,
The following questions are not R-technical, but more of general statistical
nature.
1. NORMALITY
I built a normal linear regression model and now I want to check for the
residual normality assumption. If I check the distribution graphically and
look at the descriptive characteristics (skewness and kurtosis are below 1),
I would confirm that the residuals are normally
2011 Feb 23
5
mgcv: beta coefficient and 95%CI
Hi i am doing an environmental research
The equation is as follow:
gam(y1 ~ x1 + s(x2) + s(x3) + s(x4), family = gaussian, fit = true)
I would like to obtain the beta coefficient and 95CI of x4 (or s(x4)), what
should I do?
Thanks,
Lung
--
View this message in context: http://r.789695.n4.nabble.com/mgcv-beta-coefficient-and-95-CI-tp3320491p3320491.html
Sent from the R help mailing list
2016 Apr 20
2
Interquartile Range
Well, instead of your functions try:
Mode <- function(x) {
tabx <- table(x)
tabx[which.max(tabx)]
}
and use R's IQR function instead of yours.
... so I still don't get why you want to return a character string
instead of a value for the IQR;
and the mode of a sample defined as above is generally a bad estimator
of the mode of the distribution. To say more than that would