Produces a list of knots used as input argument in various Gifi functions (homals, princals, morals, etc.). Contains options for placing knots at the quantiles, for knots equally spaced on the range, for knots at the data points, and for no interior knots.
knotsGifi(x, type = c("Q","R","E","D"), n =3)
Arguments
x: Data frame
type: "Q" for knots at the quantiles, "R" for equally spaced knots, "E" for no interior knots, "D" for knots at the data points
n: Number of interior knots (ignored for type = "E" and type = "D")
Details
Simple linear or polynomial transformations can be specified using type = "E" and the corresponding degree in the subsequent Gifi function call. If the data frame contains factors, they are converted internally to numeric using makeNumeric.
Returns
A list containing knots for each variable.
Examples
ABC6 <- ABC[,6:11]knotsGifi(ABC6,"Q")## tercile knotsknotsGifi(ABC6,"Q",4)## quartile knotsknotsGifi(ABC6,"R")## 3 equally spaced interior knotsknotsGifi(ABC6,"E")## no interior knotsknotsGifi(ABC6,"D")## knots at the data points