Learn R Programming

MortalitySmooth (version 2.3.4)

Mort1Dsmooth_estimate: Estimate 1D P-splines for a given lambda

Description

This is an internal function of package MortalitySmooth which estimates coefficients and computes diagnostics for penalized B-splines for a given smoothing parameter within the function Mort1Dsmooth.

Usage

Mort1Dsmooth_estimate(x, y, offset, wei, psi2, B, lambda, DtD, a.init, MON, TOL1, MAX.IT)

Arguments

x
Vector for the abscissa of data.
y
Vector of counts response.
offset
Vector with an a priori known component (optional).
wei
An optional vector of weights to be used in the fitting process.
psi2
Overdispersion parameter.
B
B-splines basis.
lambda
Smoothing parameter.
DtD
Inner product of the difference matrix.
a.init
Vector with the initial coefficients.
MON
Logical switch indicating if monitoring is required.
TOL1
The tolerance level in the IWLS algorithm.
MAX.IT
The maximum number of iterations.

Value

A list with components:
a
fitted coefficients.
h
diagonal of the hat-matrix.
df
effective dimension of used degree of freedom.
aic
Akaike's Information Criterion.
bic
Bayesian Information Criterion.
dev
Poisson deviance.
tol
tolerance level.
BtWB
inner product of basis and weights.
P
penalty matrix.

Details

Internal function used in Mort1Dsmooth for estimating coefficients and computing diagnostics.

See Also

Mort1Dsmooth_update, Mort1Dsmooth.