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.
unconstrained_fit_default(
X,
y,
LambdaHalf,
Lambda,
keep_weighted_Lambda,
family,
tol,
K,
parallel,
cl,
chunk_size,
num_chunks,
rem_chunks,
order_indices,
weights,
...
)
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.
Design matrix of predictors
Response variable vector
Square root of penalty matrix (\(\boldsymbol{\Lambda}^{1/2}\))
Penalty matrix (\(\boldsymbol{\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
Distribution family specification
Convergence tolerance
Number of partitions minus one (\(K\))
Flag for parallel processing
Cluster object for parallel computation
Processing chunk size
Number of computational chunks
Remaining chunks
Observation ordering indices
Optional observation weights
Additional arguments passed to glm.fit