similar to: quantile() type 1 for some ordered factors in R-devel

Displaying 20 results from an estimated 5000 matches similar to: "quantile() type 1 for some ordered factors in R-devel"

2020 May 20
1
quantile() type 1 for some ordered factors in R-devel
Hi Kurt, Thank you for fixing quantile(). However, do you think c.factor() can potentially break more functions? For example, with this new change, classification from the partykit package using predict() comes back NA because of this: https://github.com/cran/partykit/blob/597245ef3dfc98411ce919b74c68ba565f077c47/R/party.R#L500 I understand that most of the fixes will probably be simple with
2012 Jul 10
1
Why 95% "quantile" empty in R or why 95% "quantile" = 1 with data values between 0 and 1?
I am calling quantiles as follows. I don't understand why sometimes the columns (data values) above 95% are returned as "NULL"!! When I drop the percentile down to 92%, I see colums appearing. Why would any quantile be empty? I see sometimes that 95% percentile is being chosen as "1" for my data between 0 and 1, where obviously there's no column value equal to 1. But
2005 Feb 22
1
bug? quantile() can return decreasing sample quantiles for increasing probabilities
Is it a bug that quantile() can return a lower sample quantile for a higher probability? > ##### quantile returns decreasing results with increasing probs (data at the end of the message) > quantile(x2, (0:5)/5) 0% 20% 40% 60% 80% -0.0014141174 -0.0009041968 -0.0009041968 -0.0007315023 -0.0005746115 100% 0.2905596324 >
1998 Feb 26
3
R-beta: quantile
I do: x<-rnorm(1000) quantile(x,c(.025,.975)) 2% 98% -1.844753 1.931762 Since I want to find a 95% confidence interval, I take the .025 and .975 quantiles. HOWEVER R says I have the 2% (not 2.5%) and 98% (not 97.5%) points. Is it just rounding the printed 2% and 98%, or is it REALLY finding .02 and .98 points instead of .025 and .975? Thanks for any help. Bill Simpson
1998 Feb 26
3
R-beta: quantile
I do: x<-rnorm(1000) quantile(x,c(.025,.975)) 2% 98% -1.844753 1.931762 Since I want to find a 95% confidence interval, I take the .025 and .975 quantiles. HOWEVER R says I have the 2% (not 2.5%) and 98% (not 97.5%) points. Is it just rounding the printed 2% and 98%, or is it REALLY finding .02 and .98 points instead of .025 and .975? Thanks for any help. Bill Simpson
2024 Jan 26
1
DescTools::Quantile
Greetings, I am having a problem with DescTools::Quantile (a function computing quantiles from weighted samples): # these sum to one probWeights = c( 0.0043, 0.0062, 0.0087, 0.0119, 0.0157, 0.0204, 0.0257, 0.0315, 0.0378, 0.0441, 0.0501, 0.0556, 0.06, 0.0632, 0.0648, 0.0648, 0.0632, 0.06, 0.0556, 0.0501, 0.0441, 0.0378, 0.0315, 0.0257, 0.0204, 0.0157, 0.0119, 0.0087,
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 Feb 17
7
removing lower and upper quantiles from an arry
I'm trying to work out the simplest way to remove the upper and lower quantiles, in this case upper and lower 25% from an array. I can do it in two steps but when I try it in one, it fails. Is there something simple missing from my syntax or are there other simple elegant way to accomplish this? Thanks J > i <-1:20 > i2 <- i[i<quantile(i,.75)] > i3 <-
2010 Jan 17
1
Confusion in 'quantile' and getting rolling estimation of sample quantiles
Guys: 1).When I using the 'quantile' function, I get really confused. Here is what I met: > x<-zoo(rnorm(500,0,1)) > quantile(x,0.8) 400 1.060258 > c=rnorm(500,0,1) > quantile(c,0.8) 80% 0.9986075 why do the results display different? Is that because of the different type of the class? 2).And I want to use the 'rollapply' function to compute a
2006 Mar 16
4
problem for wtd.quantile()
Dear R-users, I don't know if there is a problem in wtd.quantile (from library "Hmisc"): -------------------------------- x <- c(1,2,3,4,5) w <- c(0.5,0.4,0.3,0.2,0.1) wtd.quantile(x,weights=w) ------------------------------- The output is: 0% 25% 50% 75% 100% 3.00 3.25 3.50 3.75 4.00 The version of R I am using is: 2.1.0 Best,Jing
2011 Mar 24
3
tapply with specific quantile value
All - I have an example data frame x l.c.1 43.38812035 085 47.55710661 085 47.55710661 085 51.99211429 085 51.99211429 095 54.78449958 095 54.78449958 095 56.70201864 095 56.70201864 105 59.66361903 105 61.69573564 105 61.69573564 105 63.77469479 115 64.83191994 115 64.83191994 115 66.98222118 115 66.98222118 125 66.98222118 125 66.98222118 125 66.98222118 125 and I'd like to get the 3rd
2019 May 31
2
[patch] add sanity checks to quantile()
The attached patch adds some sanity checks to the "type" argument of quantile(). Output from the following commands show the change of behavior with the current patch: vec <- 1:10 quantile(vec, type = c(1, 2)) quantile(vec, type = 10) quantile(vec, type = "aaa") quantile(vec, type = NA_real_) quantile(vec, type = 4.3) quantile(vec, type = -1) Current behavior
2009 Jan 22
3
quantile question
Hi, A simple quantile question: I need to calculate the 95% and 5% quantiles (aka percentiles) for the following data: 67.12 64.51 62.06 55.45 51.41 43.78 10.74 10.14 if I use the formula: 95% quantile point= 95 (8+1)/100, I get the 8.55th point as the 95% quantile. Which does not make too much sense as I have only 8 data points. The other option is to use (95*8)/100 = 7.6th data point (which can
2017 Jun 15
2
"reverse" quantile function
Dear All, we have: t<-seq(0,24,1) a<-10*exp(-0.05*t) b<-10*exp(-0.07*t) c<-10*exp(-0.1*t) d<-10*exp(-0.03*t) z<-data.frame(a,b,c,d) res<-t(apply(z, 1, quantile, probs=c(0.3))) my goal is to do a 'reverse" of the function here that produces "res" on a data frame, ie: to get the answer 0.3 back for the percentile location when I have
2010 Oct 07
1
Quantile question
Simple Question I have 100x100 matrix and I want to calculte each row's 30,50% quantile ex) a=matrix(rnorm(10000),100,100) quantile(a[1,],c(0.3,0.5)) quantile(a[2,],c(0.3,0.5)) . . . . I want get results at once. so I try quantile(a[1:100,],c(0.3,0.5)) but I can get what I exactly want. How can I calculte that? -- View this message in context:
2012 Mar 08
1
Doing Mathematica Quantile[] function in R
Hi all, I am an R newbie trying to do some calculations I do in Mathematica in R on a GNU/Linux system. The main thing I am interested in doing is taking a 0.999 quantile on a data set in a file who's data is normally distributed, say foo.csv. e.g in Mathematica if I have something like this : a=Import["foo.csv"] b=Transpose[a][[1]] Quantile[b,0.999] In R I can load all the data
2012 Jul 14
1
Quantile Regression - Testing for Non-causalities in quantiles
Dear all, I am searching for a way to compute a test comparable to Chuang et al. ("Causality in Quantiles and Dynamic Stock Return-Volume Relations"). The aim of this test is to check wheter the coefficient of a quantile regression granger-causes Y in a quantile range. I have nearly computed everything but I am searching for an estimator of the density of the distribution at several
2008 Oct 03
2
Question about quantile.default
Hi all, I am running into a snag using quantile function in stats. Basically, I don't understand why the loop below throws the error that it does. test.data <- rnorm(1000, 0, 1) for (i in seq(0.00001, 0.001, 0.00001)){ test <- quantile(test.data, probs=seq(0,1,i)); print(i); } It runs fine from 1e-05 to 0.00024, but then throws the error Error in quantile.default(test.data,
2009 Mar 04
3
Diff btw percentile and quantile
To calculate Percentile for a set of observations Excel has percentile() function. R function quantile() does the same thing. Is there any significant difference btw percentile and quantile? Regrads, -- View this message in context: http://www.nabble.com/Diff-btw-percentile-and-quantile-tp22328375p22328375.html Sent from the R help mailing list archive at Nabble.com.
1998 Feb 12
1
R-beta: Quantile function
Is the following behaviour of the quantile function what one would expect? > a <- 1:100 > quantile(a,.6) 60% 60.4 Philippe -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the