Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

maximizeQuadratic

Maximize a function given a table of values by quadratic interpolation.


Description

Maximize a function given a table of values by quadratic interpolation.

Usage

maximizeQuadratic(y, x=1:ncol(y))

Arguments

y

numeric matrix of response values.

x

numeric matrix of inputs of the function of same dimension as y. If a vector, must be a row vector of length equal to ncol(y).

Details

For each row of y, finds the three x values bracketing the maximum of y, interpolates a quadatric polyonomial through these y for these three values and solves for the location of the maximum of the polynomial.

Value

numeric vector of length equal to nrow(y) giving the x-value at which y is maximized.

Author(s)

Yunshun Chen and Gordon Smyth

See Also

Examples

y <- matrix(rnorm(5*9),5,9)
maximizeQuadratic(y)

edgeR

Empirical Analysis of Digital Gene Expression Data in R

v3.32.1
GPL (>=2)
Authors
Yunshun Chen, Aaron TL Lun, Davis J McCarthy, Matthew E Ritchie, Belinda Phipson, Yifang Hu, Xiaobei Zhou, Mark D Robinson, Gordon K Smyth
Initial release
2021-01-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.