Skip to content

Commit

Permalink
Add minor comment to CSF replication code (#1036)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikcs committed Aug 25, 2021
1 parent f100a58 commit bf69142
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions experiments/csf/comparison_estimators.R
Expand Up @@ -71,6 +71,7 @@ estimate_IPCW_grf = function(data, data.test) {
C.hat = predict(sf.censor)$predictions
Y.relabeled = sf.censor$Y.relabeled
C.Y.hat = rep(1, nrow(data$X)) # (for events before the first failure, C.Y.hat is one)
# Pick out S_C(Yi, X) from the estimated survival curve
C.Y.hat[Y.relabeled != 0] = C.hat[cbind(1:nrow(data$X), Y.relabeled)]
sample.weights = 1 / C.Y.hat
subset = data$D == 1
Expand Down

0 comments on commit bf69142

Please sign in to comment.