Learn R Programming

riskRegression (version 2025.09.17)

weights.wglm: Extract IPCW Weights

Description

Extract IPCW weights of IPCW logistic regressions.

Usage

# S3 method for wglm
weights(object, times = NULL, prefix = "t", simplify = TRUE, ...)

Arguments

object

a wglm object.

times

[numeric vector] time points at which the weights should be output.

prefix

[character] used to name the columns. Can be NA to keep the original names.

simplify

[logical] should the ouput be converted to a vector when only one timepoint is requested. Otherwise will always return a matrix.

...

Not used.