createTPRSmodelmatrix {predkmeans} | R Documentation |
Wrapper function for creating a matrix of thin-plate regression splines (TPRS) to be used in a regression analysis.
createTPRSmodelmatrix(data, df = 5, covarnames = NULL, xname = "x", yname = "y", TPRSfx = TRUE, matrixonly = TRUE)
data |
Matrix or data frame of data |
df |
Degrees of freedom for thinplate splines. This does not include an intercept, so the |
covarnames |
Names of other covariates to be included in the model matrix. |
xname |
Name of variable the provides the x-coordinate of location. |
yname |
Name of variable the provides the y-coordinate of location. |
TPRSfx |
Should the TPRS degrees of freedom be fixed. Passed as the |
matrixonly |
Logical indicator of whether only the model matrix should
be returned, or the full output from |
Joshua Keller
createPCAmodelmatrix
, predkmeansCVest
n <- 200 x <- runif(n=n, 0, 100) y <- runif(n=n, 0, 100) d <- data.frame(x=x, y=y) mx <- createTPRSmodelmatrix(data=d, df=5)