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
6
votes
2 answers

Inverse function of an unknown cumulative function

I'm working with a data file, the observations inside are random values. In this case I don't know the distribution of x (my observations). I'm using the function density in order to estimate the density, because I must apply a kernel…
Michelle
  • 202
  • 2
  • 14
6
votes
1 answer

Plot Percentile Indication in R / GGPLOT2

I have a basic plot of a two column data frame (x = "Periods" and y = "Range"). library (ggplot2) qplot (Periods, Range, data=twocoltest, color=Periods, size = 3,) + geom_jitter(position=position_jitter(width=0.2)) I am trying to add a horizontal…
Gratalis
  • 63
  • 1
  • 3
5
votes
1 answer

calculate quantile by group in Sparklyr

I have a dataframe in Spark, and would like to calculate the 0.1 quantile after grouping by a specific column. For example: > library(sparklyr) > library(tidyverse) > con = spark_connect(....) > diamonds_sdl = copy_to(con, diamonds) > diamonds #…
dalloliogm
  • 8,718
  • 6
  • 45
  • 55
5
votes
2 answers

R quantile by groups with assignments

I have the following df: group = rep(seq(1,3),30) variable = runif(90, 5.0, 7.5) df = data.frame(group,variable) I need to i) Define quantile by groups, ii) Assign each person to her quantile with respect to her group. Thus, the output would look…
Jb_Eyd
  • 635
  • 1
  • 7
  • 20
5
votes
1 answer

Confidence interval bands in ggplot2 when using stat_quantile?

I would like to add the median spline and corresponding confidence interval bands to a ggplot2 scatter plot. I am using the 'quantreg'-package, more specifically the rqss function (Additive Quantile Regression Smoothing). In ggplot2 I am able to add…
bonna
  • 1,575
  • 2
  • 17
  • 31
5
votes
2 answers

Getting quantiles from a beta distribution using python

I need to get the Nth quantile of a beta distribution, or equivalently, the 95% or 99% percentile. This is so much easier in Maple, which allows symbolic input -- but how is this done in Python? I've searched stackoverflow, and it seems that people…
irene
  • 2,085
  • 1
  • 22
  • 36
5
votes
1 answer

How to apply Quantile on a dataframe

I have a data.frame and I want to apply quantile on that to make data look simpler: > head(Quartile) GSM1321374 GSM1321375 GSM1321376 GSM1321377 GSM1321378 GSM1321379 1415670_at 11.203302 11.374616 10.876187 11.23639 11.02051 …
user3253470
  • 191
  • 1
  • 4
  • 11
5
votes
6 answers

Quartiles in SQL query

I have a very simple table like that: CREATE TABLE IF NOT EXISTS LuxLog ( Sensor TINYINT, Lux INT, PRIMARY KEY(Sensor) ) It contains thousands of logs from different sensors. I would like to have Q1 and Q3 for all sensors. I can do one query…
Hamma
  • 183
  • 1
  • 4
  • 12
5
votes
2 answers

quantile vs quartile in lay terms

My limited understanding is quantile and quartile are some sort of similar but totally different ways of measurement. I googled but could not find an easy to understand explanation. There is a D3 related question here but no answer yet. My specific…
ngungo
  • 4,892
  • 4
  • 29
  • 36
5
votes
4 answers

how to extract upper/lower bounds on coefficients from quantile regression rq()

I'd like to extract coefficients and upper and lower bounds from a quantile regression using the quantreg package. Here's an example from the help file. data(engel) attach(engel) taus <- c(.05,.1,.25,.75,.9,.95) f <-…
Eric Green
  • 7,385
  • 11
  • 56
  • 102
5
votes
3 answers

Getting observations corresponding to each quartile

q <- quantile(faithful$eruptions) > q 0% 25% 50% 75% 100% 1.60000 2.16275 4.00000 4.45425 5.10000 I get the following result, the dataset is provided in R. head(faithful) eruptions waiting 1 3.600 79 2 1.800 …
darkage
  • 857
  • 3
  • 12
  • 22
5
votes
1 answer

Plotting Quantile Regression Lines

In Stata, is it possible to plot quantile regression lines? I know a standard OLS regression line can be added to a scatter plot but it isn't clear to me how to add other types of regression lines. If that is not possible is, it possible to plot a…
user1892600
  • 53
  • 1
  • 4
5
votes
3 answers

Equivalent python command for quantile in matlab

I'm trying to replicate some Matlab code in python. I could not find an exact equivalent to the Matlab function quantile. What I found most close is python's mquantiles. Matlab example: quantile( [ 8.60789925e-05, 1.98989354e-05 , 1.68308882e-04,…
Jack2019
  • 275
  • 2
  • 10
5
votes
3 answers

How do I compute the Inverse gaussian distribution from given CDF?

I want to compute the parameters mu and lambda for the Inverse Gaussian Distribution given the CDF. By 'given the CDF' I mean that I have given the data AND the (estimated) quantile for the data I.e. Quantile - Value 0.01 - 10 0.5 - 12 0.7 -…
user1141785
  • 431
  • 7
  • 21
5
votes
2 answers

Quantile regression and p-values - getting more decimal places

Using R, and package quantreg, I am performing quantile regression analyses to my data. I can get access to the p-values using the se (standard error) estimator in the summary function, as below, however I only get 5 decimal places, and would like…
Luke
  • 643
  • 1
  • 10
  • 17