maximizeQuadratic: Maximize a function given a table of values by quadratic...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/maximizeQuadratic.R

Description

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

Usage

1

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

maximizeInterpolant

Examples

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

edgeR documentation built on Jan. 16, 2021, 2:03 a.m.