ps2D_PartialDeriv {JOPS} | R Documentation |
Partial derivative two-dimensional smoothing scattered (normal) data using P-splines.
Description
ps2D_PartialDeriv
provides the partial derivative
P-spline surface along x
, with aniosotripic penalization of
tensor product B-splines.
Usage
ps2D_PartialDeriv(
Data,
Pars = rbind(c(min(Data[, 1]), max(Data[, 1]), 10, 3, 1, 2), c(min(Data[, 2]),
max(Data[, 2]), 10, 3, 1, 2)),
XYpred = cbind(Data[, 1], Data[, 2])
)
Arguments
Data |
a matrix of 3 columns |
Pars |
a matrix of 2 rows, where the first and second row
sets the P-spline paramters for |
XYpred |
a matrix with two columns |
Details
This is support function for sim_vcpsr
.
Value
coef |
a vector of length |
B |
the tensor product B-spline matrix of dimensions |
fit |
a vector of |
pred |
a vector of length |
d_coef |
a vector of length |
B_d |
the tensor product B-spline matrix of dimensions |
d_fit |
a vector of |
d_pred |
a vector of length |
Pars |
a matrix of 2 rows, where each the first (second) row
sets the P-spline paramters for |
cv |
root leave-one-out CV or root average PRESS. |
XYpred |
a matrix with two columns |
Author(s)
Brian Marx
References
Marx, B. D. (2015). Varying-coefficient single-index signal regression. Chemometrics and Intelligent Laboratory Systems, 143, 111–121.
Eilers, P.H.C. and Marx, B.D. (2021). Practical Smoothing, The Joys of P-splines. Cambridge University Press.