Skip to contents

WeibullFrailtyFit: hazard lambda rho t^(rho - 1) exp(t(x) beta) with right censoring (likelihood h^delta S), and with cluster a mean-one gamma frailty of variance theta integrated out within clusters; L-BFGS on the log parameters with the analytic score, then Newton polishing. SpdePrecisionGrid: Q = tau^2 (kappa^4 C + 2 kappa^2 G + G C^(-1) G) with lumped mass h^2 I and the Neumann 5-point stiffness.

Usage

WeibullFrailtyFit(time, event, X, cluster = NULL, max_iter = 500)

SpdePrecisionGrid(nx, ny, kappa, tau, h = 1)

Arguments

time, event

Survival times and event indicators.

X

Covariate matrix (no intercept).

cluster

Cluster labels, or NULL for no frailty.

max_iter

L-BFGS iterations.

nx, ny

Grid size.

kappa, tau

SPDE parameters.

h

Grid spacing.

Value

A list.

References

Lawson, A. B. (2021). Using R for Bayesian Spatial and Spatio-Temporal Health Modeling, ch. 15. Duchateau, L. and Janssen, P. (2008). The Frailty Model. Lindgren, F., Rue, H. and Lindstrom, J. (2011). JRSS B 73, 423-498.

Examples

SpdePrecisionGrid(2, 1, 1, 1)$Q
#>      [,1] [,2]
#> [1,]    5   -4
#> [2,]   -4    5