Learn R Programming

PSsurvival (version 0.2.0)

estimate_censoring_score_weibull: Censoring Score Estimation

Description

Estimate censoring scores P(C >= T | X) using Weibull or Cox models fit separately within each treatment group. Estimate Censoring Scores Using Weibull Regression

Usage

estimate_censoring_score_weibull(
  data,
  time_var,
  treatment_var,
  formula,
  control = list(maxiter = 350)
)

Value

List with class "censoring_score_weibull":

censoring_models

Fitted survreg objects by treatment level.

censoring_scores

P(C >= T_i | Z_i, X_i) for observed treatment.

censoring_matrix

(n x J) matrix of P(C >= T_i | Z=j, X_i).

n_levels

Number of treatment levels.

treatment_levels

Sorted treatment values.

model_type

"weibull".

parameters

Transformed parameters (theta, gamma, coef, vcov, scale) by treatment level.

linear_predictors_matrix

(n x J) matrix of linear predictors.

Arguments

data

Data frame.

time_var

Name of time variable.

treatment_var

Name of treatment variable.

formula

Censoring model formula. Use Surv(time, censor_indicator) ~ X1 + X2 where censor_indicator = 1 indicates censoring. If event is coded canonically (event=1, censored=0), use I(1-event). Otherwise, use the appropriate transformation. Treatment is automatically removed if included.

control

Control parameters for survreg(). Default list(maxiter = 350).

Details

Fits Weibull models within each treatment group. Censoring scores computed as: $$K_c^{(j)}(t, X) = \exp(-\exp(X'\theta_j) \cdot t^{\gamma_j})$$ where \(\theta_j = -\beta_j/\sigma_j\), \(\gamma_j = 1/\sigma_j\).