pspline_fitter appies the method of scoring
to a variety of response distributions and link functions within
for P-spline fitting within the GLM framework.
pspline_fitter(
y,
B,
family = "gaussian",
link = "identity",
P,
P_ridge = 0 * diag(ncol(B)),
wts = 0 * y + 1,
m_binomial = 0 * y + 1,
r_gamma = 0 * y + 1
)the estimated P-spline coefficient regressor, using the effective regressors.
wts*w, GLM weight vector times input weights of length m.
the lsfit object using data augmentation to get P-spline coefficient estimates.
the linear predictor from f.
the glm response vector of length m.
The effective P-spline regressors, e.g. B for B-splines, Q=X %*% B for PSR.
the response distribution, e.g. "gaussian", "binomial", "poisson", "Gamma" distribution; quotes are needed
(default family = "gaussian".)
the link function, one of "identity", "log", "sqrt",
"logit", "probit", "cloglog", "loglog", "reciprocal";
quotes are needed (default link = "identity").
P-spline ("half") penalty matrix for data augmentation, such that P'P = lambda D'D.
ridge ("half") penalty for data augmentation, usually sqrt(lambda_r)*I (default 0).
the weight vector of length(y), separate from GLM weights.
a vector of binomial trials having length(y), when family = "binomial".
Default is 1 vector.
a vector of gamma shape parameters, when family = "Gamma". Default is 1 vector.