similar to: strange results in summary and IQR functions

Displaying 20 results from an estimated 1000 matches similar to: "strange results in summary and IQR functions"

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%
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 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 <-
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
2009 Sep 29
4
Something wrong with my function Please Help
Hi R users, I try to build a function to compute odds ratio and relative risk however something wrong. I stuck for many hours but I really don't know how to solve it. Would someone please give me a hint? > OR.RR<-function(x){ + x <- as.matrix(any(dim(x)==2)) + OR<-(x[1,1]*x[2,2])/(x[1,2]*x[2,1]) + RR<-(x[1,1]/(sum(x[1,])))/(x[2,1]/(sum(x[2,]))) +
2009 Jun 12
1
Please Help pairwise.t.test!!
Hi R users, My question is, If I have 3 groups, A, B, C and I know mean of A =20, B=21, and C=20.5 and I also know the standard error of A =1.1, B=2.2, C=3.2. Plus, I know A has 30 observations, B has 78, C has 45. But I do not have the raw data. Can I use pairwise.t.test to conduct a Bonferroni test? If yes, Could you give me a hint? Thank you so much Chunhao -- View this message in
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
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
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
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.
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
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
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 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,
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
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) {
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
2006 Oct 09
1
boxplot, notches, etc.
Sorry to repost this, but it looks like it's getting buried in r-help (originally posted October 5: my experience says that if it hasn't been answered by then it won't be). I wouldn't bother, but I'm worried that r-devel might be better, *and* a previous e-mail of mine on the subject in January also seemed to get buried. Synopsis: boxplot notches look weird when notches are
2016 Apr 19
1
Interquartile Range
HI that did not work for me either. The value I got returned from that function was "<rounded mean> - <rounded mean>" :(. thanks for the reply through On Tue, Apr 19, 2016 at 10:34 AM, William Dunlap <wdunlap at tibco.com> wrote: > > That didn't work Jim! > > It always helps to say how the suggestion did not work. Jim's > function had a typo
2012 Nov 14
2
aggrete data from combination
Dear R users, A have a dataframe (matrix) with two collumns (plot, and diameter (d)). I want all diameters values for different combination of plots. For example I want all d values for all posible combination, 100C2 (all d values for plot 1 with all d values in the plot 2.......with all d values from plot 1 with all d values from plot 100, ...... with all d values from plot 99 with all d values