Second order fractional polynomial

get_fp_2o(x, params, exponents, sums = NULL)

Arguments

x

A vector with the dependent variable.

params

A matrix with two columns giving the intercept and the "slope". If more than one rows given, the fractional polynomial is evaluated for each row.

exponents

A vector giving the exponents (p1, p2) of the polynomial.

sums

A function. If non-null, sums of the fractional polynomial at each x value (i.e. summaries over the different params values) are calculated.

Value

A matrix with length(x) rows giving the FP values or FP summaries.