Displaying 20 results from an estimated 1428 matches for "quantiles".
Did you mean:
quantile
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
2020 Jan 04
0
[patch] add sanity checks to quantile()
On Fri, May 31, 2019 at 01:28:55AM -0400, Scott Kostyshak wrote:
> 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")
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
...--------------------------------------------------------
Saji Ren
from Shanghai China
GoldenHeart Investment Group
------------------------------------------------------------------
--
View this message in context: http://n4.nabble.com/Confusion-in-quantile-and-getting-rolling-estimation-of-sample-quantiles-tp1015893p1015893.html
Sent from the R help mailing list archive at Nabble.com.
2004 Jul 20
0
Suggestion for quantile.default()
...sure who is responsible for quantile(), but I assume they read
this list. Ivan Frohne and I have produced a revision of the
quantile.default() function which enables the computation of alternative
sample quantile definitions. The code and .Rd file are attached.
This enables the user to produce quantiles that are equivalent to those
in various statistics package. There is a type argument that allows one
to choose between the various sample quantile methods. type=7 gives
identical results to the current R function quantile.default(). In our
revised function, type=8 is the default following the r...
2011 Dec 06
2
Why can't I figure this out? :S
Hi, so I don't speak computer and I have no idea what this code is telling
the program to do, but I apparently need to be able to find and isolate
influencial observations. Problem, I have no idea what the error means and
where it may be from in the code.
error I get is below the code
{
## OLS results
NameC<- lm(gpanew~female+female:lastinit+agenew+canadian+mom_ed+yearstudy)
## default:
2011 Mar 24
3
tapply with specific quantile value
...864 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 quantile by l.c.1 so I use
tapply(x, l.c.1, quantile)
and my output includes all quantiles (i.e., 0, 25%, 50%, 75%, 100%)
but I'm only interested in the 75% quantile. Is there an additional
statement or function I can use to get just the quantile that I want?
Thanks for your help -
SR
Steven H. Ranney
2013 Apr 03
5
Can package plyr also calculate the mode?
...<- ddply(all,"ACT_NAME", summarise, mean=mean(COUNTS), sd=sd(COUNTS),
q25=quantile(COUNTS,.25),median=quantile(COUNTS,.50),
q75=quantile(COUNTS,.75),
q90=quantile(COUNTS,.90), q95=quantile(COUNTS,.95),
q99=quantile(COUNTS,.99) )
So I got the mean, median std dev, quantiles etc.
IS there any way I can add the mode to the mixt. Thanks ahead for any
suggestions.
--
View this message in context: http://r.789695.n4.nabble.com/Can-package-plyr-also-calculate-the-mode-tp4663235.html
Sent from the R help mailing list archive at Nabble.com.
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
2020 May 18
3
quantile() type 1 for some ordered factors in R-devel
Hi,
In R-devel (2020-05-17 r78478) quantile() type 1 seems to behave a little
bit strange for some ordered factors:
quantile(factor(1:3, ordered = TRUE), 0.5, type = 1)
returns ?2? as expected. But
quantile(factor(2:4, ordered = TRUE), 0.5, type = 1)
returns ?4? and
quantile(factor(3:5, ordered = TRUE), 0.5, type = 1)
returns ?NA?. Furthermore, the function returns ?NA? for calls like
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
>
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 points of the...
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.
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 b...
2009 Feb 17
6
Percentiles/Quantiles with Weighting
...ted in if there is an accepted (and/or
R-implemented) method to apply weighting to the data so as to weigh recent
data more heavily.
I wrote the following function, but it seems quite inefficient, and not
really very flexible in its applications - so if anyone has any suggestions
on how to look at quantiles/percentiles within R while also using a
weighting schema, I would be very interested.
Note - this function supposes the data in X is time-sequenced, with the most
recent (and thus heaviest weighted) data at the end of the vector
WtPercentile <- function(X=rnorm(100), pctile=seq(.1,1,.1))
{
X...
2013 Feb 19
3
Quantiles of a subset of data
bradleyd wrote
> Excuse the request from an R novice! I have a data frame (DATA) that has
> two numeric columns (YEAR and DAY) and 4000 rows. For each YEAR I need to
> determine the 10% and 90% quantiles of DAY. I'm sure this is easy enough,
> but I am a new to this.
>
>> quantile(DATA$DAY,c(0.1,0.9))
> 10% 90%
> 12 29
>
> But this is for the entire 4000 rows, when I need it to be for each YEAR.
> Is there no way to use a "by" argument in the quantil...
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.6...
2006 Apr 19
1
Hmisc + summarize + quantile: Why only quantiles for first variable in data frame?
Hi,
I'm working on a data set that contains a couple of factors and a
number of dependent variables. From all of these dependent variables
I would like to calculate mean, standard deviation and quantiles.
With the function FUN I get all the means and stdev that I want but
quantiles are only calculated for the first of the dependent
variables (column 8 in the summarize command). What do I have to do
differently in order to get all the quantiles that I want?
Thanks,
Kim
sgldm2 <- read.t...
2018 Apr 19
4
create multiple categorical variables in a data frame using a loop
Hi All,
I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code.
pfas.pheno <-within(pfas.pheno, {cat.pfoa<-NA
cat.pfoa[pfas.pheno$log2pfoa <=quantile(pfas.pheno$log2pfoa,0.25, na.rm =T)]<-0
cat.pfoa[pfas.pheno$log2pfoa >=quantile(pfas.pheno$log2pfoa,0.75, na.rm =T)]<-2
2013 Jul 08
1
Segmentar archivos en R (Antonio José Sáez Castillo)
...42135.6
18458.85 Numeric,5
CAPITAL FEDERAL 536152.3
26888.67 Numeric,5
CATAMARCA 11409.81
5415.242 Numeric,5
....
Cuando en realidad en lugar de [,3] debería decirme los valores
correspondientes a los quantiles que le solicité, ¿verdad?
Por defecto, with(ProduccionAC, tapply(Costo, Provincia, quantile, probs =
c(0.25, 0.75, 0.85, 0.90, 0.95))) es un "array". Si lo fuerzo como
as.data.frame, resulta algo extraño:
with(ProduccionAC, tapply(ProduccionAC$Costo, ProduccionAC$Provincia,
BUE...