Questions tagged [quantile]

Quantiles are points taken at regular intervals from the cumulative distribution function (CDF) of a random variable.

In scientific software for statistical computing and graphics, the quantile of a numeric vector can be found by function quantile.

755 questions
0
votes
1 answer

how to find 80% of distribution

A have a problem. I have a data frame byDays, which consists of two columns: day and money. Day looks like sequence from 0 to 100. And Money means amount of money, our customers spent in this day. I plotted distribution, but cant link it, havent…
Slavka
  • 1,070
  • 4
  • 13
  • 28
0
votes
1 answer

R-programming. Percentiles

So I have estimated 1000 cash flows 10 years ahead. These cash flows are contained in a 1000*10 matrix. For analytical purposes I want to examine the different percentiles/quantiles in terms of cash flows. Part of my R-code plot(timeline,…
Andreas
  • 85
  • 2
0
votes
1 answer

Does trimming 2% of scores from top and bottom each leave me with quantiles .02 - .98?

If you have a dataset and trim 2% from both the top and bottom, for a 4% total trim, you're left with the middle 96% of scores. Would this mean the only remaining scores would be ranging from the .02 quantile to .98 quantile of the original…
jsuprr
  • 97
  • 1
  • 6
0
votes
0 answers

Quantiles and data interval for comparison

I have a question regarding the use of quantiles for determining the enveloppe of a curve. This is what I am doing: I have a continuous variable ("var") that I turned discrete using cut ("var_cut"), and a related variable obtained from the the…
Chris. Z
  • 365
  • 1
  • 7
  • 17
0
votes
1 answer

Lower and upper quantiles within grouping factors

I have a dataframe with two grouping variables grp1 and grp2 and a continuous variable val. I would like to trim the lower and upper deciles within the two grouping variables. I have here a solution which is a little cumbersome: #…
giordano
  • 2,954
  • 7
  • 35
  • 57
0
votes
1 answer

Assigning Percentile Based Groups to Dataframe in R

I am having trouble figuring out how to take on this particular problem. Suppose I have the following data frame: set.seed(123) Factors <- sample(LETTERS[1:26],50,replace=TRUE) Values <- sample(c(5,10,15,20,25,30),50,replace=TRUE) df <-…
theamateurdataanalyst
  • 2,794
  • 4
  • 38
  • 72
0
votes
0 answers

R, how to plot multiple plots from a multiple column table?

I have a table made of 10 rows and 6 columns, where each entry is a real value. After the application of kmeans algorithm, I would like R to plot 6*(6-1) = 30 plots, in which each couple of rows is the axis in turn. When I do it with the original…
DavideChicco.it
  • 3,318
  • 13
  • 56
  • 84
0
votes
2 answers

Quantile per group in ddply

I tried to classify my grouped data into quartiles, therefore adding a column diam_quart to the data frame z assigning each row one of the four classes 1, 2, 3, or 4: quart = ddply(z, .(Code), transform, diam_quart = ifelse(Diameter <=…
Brazza
  • 47
  • 6
0
votes
3 answers

R qqplot argument "y" is missing error

I am relatively new to R and I am struggling with a error messages related to qqplot. Some sample data are at the bottom. I am trying to do a qqplot on some azimuth data, i.e. like compass directions. I've looked around here and the ?qqplot R…
mdhunstiger
  • 3
  • 1
  • 1
  • 3
0
votes
2 answers

R: min, max, mean and median of a vector within 95% confidence interval (2.5 to 97.5 percentiles)

I ran 1000 iterations to generate a normal deviate using rnorm and saved it in a vector: rvec <- rnorm (1000, mean = 0.143927671, sd = 0.110680809) I need to find a min, max, mean and median of a vector within 95% confidence interval (2.5 to 97.5…
Liza
  • 1,066
  • 2
  • 16
  • 26
0
votes
1 answer

How to get Interquantile list of values in R

Take any random dataset: data = rnorm(100) I want to get a list of the largest 5% of values in this data. If I try: quantile(data, .95) ...then I get the single value at the 95th percentile. If I try: quantile(data, probs=c(1, .95)) ...then I…
bubbalouie
  • 643
  • 3
  • 10
  • 18
0
votes
1 answer

r Change quantile 'type' within summary.default

Question Following on from this question that asked about different quantile types, is it possible to change the type argument for quantile when using the summary() function? For example, taking the dataset d <- c(11, 4, 1, 4, 2, 2, 6, 10, 5, 6, 0,…
tospig
  • 7,762
  • 14
  • 40
  • 79
0
votes
1 answer

R: How to create a Quartile Column within Groups

I have managed to create the column "qaurtile" with the following code, but I'd also like to create a column called "quartile_team" that shows the quartiles within each team. I can't figure out how to do this. Help is appreciated, Paul # generate…
user3344266
  • 69
  • 1
  • 7
0
votes
1 answer

r- Adding multiple unrelated nonlinear fuctions (not fitted) to a scatterplot

I have made a scatter plot of raw data. The equation for the quantile lines takes the form of y=10^a*x^b. (The equation for the quantile was log transformed and meaningless to the audience when viewed). How do I add this form of a function to the…
0
votes
3 answers

In R, how do I assign quantiles for different factors?

There's lots of advice for how to calculate quantiles for a column of data, but I'm trying to label each data point with which quantile it belongs to based on some other field. A super simple…