unconstrained_fit_default {lgspline} | R Documentation |
Unconstrained Generalized Linear Model Estimation
Description
Fits generalized linear models without smoothing constraints using penalized maximum likelihood estimation. This is applied to each partition to obtain the unconstrained estimates, prior to imposing the smoothing constraints.
Usage
unconstrained_fit_default(
X,
y,
LambdaHalf,
Lambda,
keep_weighted_Lambda,
family,
tol,
K,
parallel,
cl,
chunk_size,
num_chunks,
rem_chunks,
order_indices,
weights,
...
)
Arguments
X |
Design matrix of predictors |
y |
Response variable vector |
LambdaHalf |
Square root of penalty matrix ( |
Lambda |
Penalty matrix ( |
keep_weighted_Lambda |
Logical flag to control penalty matrix handling: - 'TRUE': Return coefficients directly from weighted penalty fitting - 'FALSE': Apply damped Newton-Raphson optimization to refine estimates |
family |
Distribution family specification |
tol |
Convergence tolerance |
K |
Number of partitions minus one ( |
parallel |
Flag for parallel processing |
cl |
Cluster object for parallel computation |
chunk_size |
Processing chunk size |
num_chunks |
Number of computational chunks |
rem_chunks |
Remaining chunks |
order_indices |
Observation ordering indices |
weights |
Optional observation weights |
... |
Additional arguments passed to |
Value
Optimized parameter estimates for canonical generalized linear models.
For fitting non-canonical GLMs, use keep_weighted_Lambda = TRUE
since the
score and hessian equations below are no longer valid.
For Gamma(link='log') using keep_weighted_Lambda = TRUE
is misleading.
The information is weighted by a constant (shape parameter) rather than some
mean-variance relationship. So keep_weighted_Lambda = TRUE
is highly
recommended for log-link Gamma models. This constant flushes into the
penalty terms, and so the formulation of the information matrix is valid.
For other scenarios, like probit regression, there will be diagonal weights incorporated into the penalty matrix for providing initial MLE estimates, which technically imposes a prior distribution on beta coefficients that isn't by intent.
Heuristically, it shouldn't affect much, as these will be updated to their proper form when providing estimates under constraint; lgspline otherwise does use the correct form of score and information afterwards, regardless of canonical/non-canonical status, as long as 'glm_weight_function' and 'qp_score_function' are properly specified.