Learn R Programming

alR (version 2.2.0)

qlin: Point corresponding to quantile. Calculate the \(x\) point corresponding to a quantile \(F(x)\) using linear interpolation.

Description

Point corresponding to quantile. Calculate the \(x\) point corresponding to a quantile \(F(x)\) using linear interpolation.

Usage

qlin(x, y, q)

Arguments

x

A numeric vector, specifying the \(x\) values.

y

A numeric vector, specifying the \(F(x)\) values.

q

A real number between 0 and 1 inclusive, specifying the desired quantile.

Value

The interpolated quantile, \(x\), corresponding to \(q=F(x)\).

Examples

Run this code
# NOT RUN {
x <- rnorm(100)
y <- pnorm(x)
qlin(x, y, 0.5)
# }

Run the code above in your browser using DataLab