similar to: Visualize quartiles of plot line

Displaying 20 results from an estimated 1000 matches similar to: "Visualize quartiles of plot line"

2010 Jan 22
2
Quartiles and Inter-Quartile Range
Why am I getting a wrong result for quartiles? here is my code: > cbiomass = c(910, 1058, 929, 1103, 1056, 1022, 1255, 1121, 1111, 1192, > 1074, 1415) > summary(cbiomass) > IQR(cbiomass) The result R gives me is: For the summary > Min. 1st Qu. Median Mean 3rd Qu. Max. 910 1048 1088 1104 1139 1415 For IQR > 91.25 ********* The true Q1 is 1039
2011 Oct 31
3
How to get Quartiles when data contains both numeric variables and factors
When data contains both factor and numeric variables, how to get quartiles for all numeric variables? n <- 100 x1 <- runif(n) x2 <- runif(n) x3 <- x1 + x2 + runif(n)/10 x4 <- x1 + x2 + x3 + runif(n)/10 x5 <- factor(sample(c('a','b','c'),n,replace=TRUE)) x6 <- factor(1*(x5=='a' | x5=='c')) data1 <- cbind(x1,x2,x3,x4,x5,x6) data
2007 Feb 12
6
Boxplot: quartiles/outliers
For boxplot(), is it possible to pass in a parameter to change the default way that the 1st and 3rd quartiles are computed? (specifically, I'd like to use type 6 described in the quantile function). Also, what are the options for how outliers are computed, and how can one change them? Thank you [[alternative HTML version deleted]]
2005 May 13
5
Conflict between xtable and Hmisc when using Sweave?
Dear R users, The Sweave code below runs fine, as it is. However, an error occurs when the line 'library(xtable)' is uncommented: Error: chunk 1 Error in "label<-"(`*tmp*`, value = "month") : no applicable method for "label<-" Is anybody aware of this and knows a workaround? Thanks, Sander. *******************
2001 Jul 10
1
returning quartiles of a list?
Hi, all. I have a list: process <- c( 5 , 7 , 4 , 1 , 4 , 1) and I'd like to get each half (or each third or each quartile) of the list: process.firsthalf would be (5, 7, 4) and process.secondhalf would be (1, 4, 1). note that I'm not interested in the numeric quartiles (then I could use quantile or several other functions). what is the best way to get this kind of thing? for
2008 Apr 03
1
prettyR 25% quartile, 75% quartile
I am using the describe function in prettyR. I would like to add the 25% 75% quartiles to the summary table how do I do this I have tried describe(x.f, num.desc=c("mean", "median", "sd", "min", "max", "skewness", "quantile(x.f, na.rm=T, probs=seq(0.25, 0.75))", "valid.n")) help -- Let's not spend our time
2007 May 21
1
Special characters on axis lables
Hello, is there a way to specify special characters as a axis label? I need to have a tick marking the "infinity" in my plot... Is there a way? Or possibly a way to include latex-style formulas? Thanks in advance, Arne
2007 Jul 16
1
Problem to sort factor
Hello, I'm having a problem renaming and sorting the underlying factor of a ggplot2 based plot. Here's my code: ---8<---------- > delta <- ggplot(subset(data, Model==c("dyn", "dl4", "dl3")), aes(x=Problemsize, y=Fitness)) + geom_smooth(size=1, color="black", fill=alpha("blue", 0.2))+ geom_point(size=0.5,
2012 Jan 13
1
Quantiles in boxplot‏
Hi, I have a simple question about quartiles in R, especially how they are calculated using the boxplot. Quartiles (.25 and .75) in boxplot are different from the summary function and also don't match with the 9 types in the quantile function. See attachment for details. Can you give me the details on how the boxplot function does calculate these values? Cheers, Rene Brinkhuis
2000 Dec 11
1
qqline (PR#764)
I think qqline does not do exactly what it is advertised to do ("`qqline' adds a line to a normal quantile-quantile plot which passes through the first and third quartiles."). Consider the graph: tmp <- qnorm(ppoints(10)) qqnorm(tmp) qqline(tmp) The line (which I expected go through all the points), has a slightly shallower slope than does the points plotted by qqnorm. I think
2008 Nov 03
1
quantcut
I'm trying to devide x into tertiles, but ends up with integer limits even x holds one decimal. The analysis is extremely sensitive to the limits and I like to keep them right. How can that be done? quartiles <- quantcut( x[x >= 0], q=seq(0,1, by=(1/3)) > table(quartiles) quartiles [180,344] (344,448] (448,644] 16467 16476 16452 [[alternative HTML version deleted]]
2007 May 14
1
Nicely formatted summary table with mean, standard deviation or number and proportion
Dear all, The incredibly useful Hmisc package provides a method to generate summary tables that can be typeset in latex. The Alzola and Harrell book "An introduction to S and the Hmisc and Design libraries" provides an example that generates mean and quartiles for continuous variables, and numbers and percentages for count variables: summary() with method = 'reverse'. I
2007 Apr 11
1
Boxplot with quartiles generated from different algorithms
R users: I am trying to replicate the boxplot output I achieve with Minitab in R. I realize that R gives the user many more options on the algorithm used to calculate the IQR than Minitab, so I concentrated on type=6 when using the quantile() function in R. The problem I am having is setting the upper and lower limit of the whisker based on the nearest actual data that should be included. If
2008 Mar 06
1
Storing output in an array or matrix
I have a data set which has, let's say, income by state. I'm trying to output income quartiles for each state into an array by doing a loop so that I don't have to do it state by state by hand. ie, something like for (i in 1:50) { quantile(subset(data,state==i)$income) -> r[i,5] } where the output of quantile will give 5 columns for each state. r would be a 50x5 matrix
2008 Aug 05
5
boxplot with average instead of median
I really like the ease of use with the boxplot command in R. I would rather have a boxplot that shows the average value and the standard deviation then the median value and the quartiles. Is there a way to do this? Chad Junkermeier, Graduate Student Dept. of Physics West Virginia University PO Box 6315 210 Hodges Hall Morgantown WV 26506-6315 phone: (304) 293-3442 ext. 1430 fax: (304)
2002 Feb 21
2
help understanding box plots
Another naive stats question. I'm trying to better understand what boxplots are telling me. I think what I see is the median and the boundaries of the 1st and 3rd quartiles. The whiskers represent the range of the data unless there are points which are outside "range" (default: 1.5) times the distance from the median to that quartile. Is that right? I've read the
2010 Oct 26
2
Forcing results from lm into datframe
Hi I need some help getting results from multiple linear models into a dataframe. Let me explain the problem. I have a dataframe with ejection fraction results measured over a number of quartiles and grouped by base_study. My dataframe (800 different base_studies) looks like > afvtprelvefs basestudy quartile ef ef_std entropy CBP0908020 1 21.6 0.53 3.27
2007 Apr 06
5
Labelling boxplot with fivenumber summary
I am very new to R so forgive me if this seems basic but I have done extensive searching and failed to come up with the answer for myself. I am trying to label a boxplot I have created with the values for the median, upper and lower quartiles and max and min values. I have been unable to do this or find anything on the net to say how it might be done. Is this possible and if so how? Regards,
2006 Oct 25
1
Drawing a reference line for a qqplot with reference to Weibull distribution
Hi, I'm trying to create a qqplot with reference to a Weibull distribution including a reference line. This is my current code: lights.data <- scan("lights.dat") #Generate Weibull quantiles prob.grid <- ppoints(length(lights.data)) prob.quant <- qweibull(prob.grid , 1.5,4) #Draw QQ plot qqplot(prob.quant,lights.data) #add red reference line qqline(lights.data,col = 2)
2003 Apr 29
4
thick plot lines
Dear People, In a qqplot I am doing, I get lines/points that are very thick. I've tried setting the lwd variable to 0.1, but it doesn't seem to have any effect. Also, I have set the value of lty to dashed, but I still get dots. The command looks like qqplot(cdf.inv(seq(0,1,length=size),theta,pos,len),empmargdistvec(len,theta,pos,size), xlim=c(-theta,theta), ylim=c(-theta,theta),