Displaying 20 results from an estimated 10000 matches similar to: "percentile of a given value: is there a "reverse" quantile function?"
2012 Mar 03
2
contour for plotting confidence interval on scatter plot of bivariate normal distribution
Dear all,
I created a bivariate normal distribution:
set.seed(138813)
n<-100
x<-rnorm(n); y<-rnorm(n)
and plotted a scatterplot of it:
plot(x,y)
Now I'd like to add the 2D-standard deviation.
I found a thread regarding plotting arbitrary confidence boundaries from
Pascal H?nggi
http://www.mail-archive.com/r-help at r-project.org/msg24013.html
which cites the even older thread
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
2017 Jun 15
0
"reverse" quantile function
> On Jun 15, 2017, at 12:37 PM, Andras Farkas via R-help <r-help at r-project.org> wrote:
>
> 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
2011 May 25
3
how to compute the inverse percentile of a given observation w.r.t. a reference distribution
Hi,
can anyone help me to figure out how to compute the percentile of an
individual observation with respect to a reference distribution.
What I mean is. Let's assume I have a vector consisting of 10 numbers
{3,5,8,1,9,5,4,3,5.5,7} and I want figure out what percentile the
number 4.9 corresponds to. I failed to find any reference to such a
function, although I would assume this must
2017 Jun 15
2
"reverse" quantile function
David,
thanks for the response. In your response the quantile function (if I see correctly) runs on the columns versus I need to run it on the rows, which is an easy fix, but that is not exactly what I had in mind... essentially we can remove t() from my original code to make "res" look like this:
res<-apply(z, 1, quantile, probs=c(0.3))
but after all maybe I did not explain
2010 Sep 07
2
Percentile rank for each element in list
Heeeelp
Given this data
x <- c(1,5,100,300,250,200,550,900,1000)
> quantile(x)
0% 25% 50% 75% 100%
1 100 250 550 1000
When I run the quantile, I can only know the value of the nth
percentile
I want to know what's the percentile position of each items in the
list
Sample
1 = 100% on the list has 1 or more
5 = more than x% on the list has 5 or more
100 = more than x% on the
2011 Dec 23
3
data vector to corresonding percentile ranks
I have a problem where I need to calculate the corresponding cohort
percentile ranks for each of several variables.
Essentially, what I need is a function that will calculate the
distribution-free percentiles from each variable's data vector, returning a
corresponding vector of percentiles:
e.g.:
percentile.my.data<-/function/(my.data)
I tried to make ecdf() perform this task but
2017 Jun 16
0
"reverse" quantile function
It would depend on which one of the 9 quantile definitions you are using. The discontinuous ones aren't invertible, and the continuous ones won't be either, if there are ties in the data.
This said, it should just be a matter of setting up the inverse of a piecewise linear function. To set ideas, try
x <- rnorm(5)
curve(quantile(x,p), xname="p")
The breakpoints for the
2011 Feb 10
1
How to determine the quantile boundary from an ECDF?
Given a dataset x, the ecdf is ecdf(x). Then I can use ecdf(x)(y) to find
the percentile of y. Given the ecdf is there a way to determine what is the
value of y that is the boundary of let's say 95 percentile? In other words,
is there a function I can call on the ecdf like:
fomeFunc( ecdf( x ), 0.95 )
Which will return the highest value of y, for which ecdf( y ) < 0.95?
The only solution
2012 Jan 11
2
Finding percentile of a value from an empirical distribution
Hello,
I am not sure how to do this in R. Any suggestion would be
appreciated. I have a vector of values from where I build an empirical
CDF. For example:
> x <- seq(1,100)
> x <- sample(x,1000,replace=T)
> quantile(x,probs=seq(0,1,.05))
0% 5% 10% 15% 20% 25% 30% 35% 40% 45%
50% 55%
1.00 5.00 10.00 16.00 20.00 25.00 31.00 36.00 41.00
2005 Jan 07
2
Getting empirical percentiles for data
Dear List,
I have some discrete data and want to calculate the percentiles and the
percentile ranks for each of the unique scores. I can calculate the
percentiles with quantile().
I know that "ecdf" can be used to calculate the empirical cumulative
distribution. However, I don't know how to exact the cumulative
probabilities for each unique element. The requirement is similar
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.
2011 Aug 02
3
how to get the percentile of a number in a vector
I'm familiar with the quantile() command, but what if I have a specific
number that I want to know its location in a vector? I know that in known
distributions, (for example the normal distribution), there is pnorm and
qnorm, but how can I do it with unknown vector?
thanks in advance
_________________________________________________________________
Walla! Mail - [1]Get
2012 Nov 05
2
Replace array with percentile values
Hi:
I have an array of measurements, that I've been doing linear
regression model and AI models on. Because there are many errors and
the values are "ill-formed" I would like to copy the array, but
replace each value with the PERCENTILE of that value, in the original
array.
i.e.
mesments$V1: 9, 77, -1
would become: mesmentsCopy$V1: 50, 100, 0
The actual array has many more
2010 May 28
1
create new variable: percentile value of variable in data frame
Hello all,
Thanks in advance for you attention.
I would like to generate a third value that represents the quantile
value of a variable in a data frame.
# generating data
x <- as.matrix(seq(1:30))
y <- as.matrix(rnorm(30, 20, 7))
tmp1 <- cbind(x,y)
dat <- as.data.frame(tmp1)
colnames(dat) <- c("id", "score")
dat
# finding percentiles of "score"
2009 Aug 18
2
value of nth percentile
Dear All,
I have to get the value of say 90th percentile of precipitation time series.. The series is of daily precipitation value of 96 years, I have to to get 90the percentile value of daily precipitation each year. If you know the R code or command for this please let me know.
I would appreciate your early response.
Thanking you,
Sincerely,
Ajay.
2012 Nov 08
3
difference percentile R vs SPSS
Dear list,
I am calculating the 95th percentile of a set of values with R and with SPSS
In R:
> normal200<-rnorm(200,0,1)
> qnorm(0.95,mean=mean(normal200),sd=sd(normal200),lower.tail =TRUE)
[1] 1.84191
In SPSS, if I use the same 200 values and select Analyze -> Descriptive Statistics -> Frequencies
and under "Statistics", I type in '95' under Percentiles,
2007 Jun 18
2
Calculating Percentile in R
Hi all,
I have a problem on how R calculates Percentiles :
Suppose I have following data set:
> data1
[1] -16648185 -14463457 -14449400 -13905309 -13443436 -13234755 -12956282 -11660896
[9] -10061040 -9805005 -9789583 -9754642 -9562164 -9391709 -9212182 -9151073
[17] -9092732 -9068214 -8978151 -8943912 -8761890 -8632106 -8541580 -8501249
[25] -8234466 -8219015
2017 Aug 16
1
Bias-corrected percentile confidence intervals
Hi folks,
I'm trying to estimate bias-corrected percentile (BCP) confidence
intervals on a vector from a simple for loop used for resampling. I am
attempting to follow steps in Manly, B. 1998. Randomization, bootstrap
and monte carlo methods in biology. 2nd edition., p. 48. PDF of the
approach/steps should be available here:
https://wyocoopunit.box.com/s/9vm4vgmbx5h7um809bvg6u7wr392v6i9
If
2013 Jan 03
1
Inserting percentile values in a data frame
Hello
I need to calculate and insert the values for the 50,75,90,95 & 99
percentiles in a data frame for each row.
I used agr1$quantile <- quantile(agr1$cnt, probs=c(.50, .75, .90, .95, .99))
but that didn't work.
How can calculate the percentile for my variable "cnt" , insert & name the
percentile as p50, p75, etc
in my data frame agr1?
Thanks in advance for your