npORMissing | R Documentation |
Nonparametric Targeted estimates and inference for the conditional odds ratio with a user-specified parametric working-model with 'post-treatment“ informative outcome missingness.. This version also allows for the outcome is missing-at-random conditional on Z,A,W. Note this version is totally nonparametric and requires no assumptions on the functional form of the conditional odds ratio for correct inference. The user-specified working model is used to find a best-approximation (relative to the working-model) of the true conditional odds ratio. This function can be viewed as a nonparametric version of the partially-linear logistic regression model where one uses the working model 'logit(P(Y=1|A,W)) = b* A f(W) + logit(P(Y=1|A=0,W)' for a user-specified parametric function 'f(W)' to approximate the true function. Nonparametrically correct and efficient inference is given for this best approximation of the conditional odds ratio.
npORMissing( working_formula = logOR ~ 1, W, A, Y, Z = stop("No Z variable given. Use spOR or npOR instead if the variable `Z` is not used"), Delta, weights = NULL, W_new = W, glm_formula_YZW = NULL, sl3_learner_YZW = NULL, glm_formula_Y0W = NULL, sl3_learner_Y0W = NULL, glm_formula_OR = NULL, sl3_learner_OR = NULL, glm_formula_A = NULL, sl3_learner_A = NULL, glm_formula_Delta = NULL, sl3_learner_Delta = NULL, sl3_learner_default = Lrnr_hal9001_custom$new(max_degree = 2, smoothness_orders = 1, num_knots = c(30, 10)) )
working_formula |
An working-model R formula object describing the functional form of the approximation of the conditional log odds ratio as a fnction of 'W'. #' This corresponds with 'f(W)' in the partially linear logistic-link model 'logit(P(Y=1|A,W)) = b*Af(W) + h(W)'. |
W |
A named matrix of baseline covariates |
A |
A binary vector with values in (0,1) encoding the treatment assignment |
Y |
A binary outcome variable with values in (0,1) |
Z |
A matrix of post-treatment variables that inform the missingness of the outcome 'Y'. This variable can be NULL if the missingness is only effected by 'A' and 'W'. |
Delta |
A binary vector that takes the value 1 if 'Y' is osberved/not-missing and 0 otherwise. |
weights |
An optional vector of weights for each observation. Use with caution. This can lead to invalid inferences if included naively. |
W_new |
An optional matrix of new values of the baseline covariates 'W' at which to predict odds ratio. |
glm_formula_Y0W |
(Not recommended). An optional R formula object describing the nuisance function 'logit(P(Y=1|A=0,W))'. |
sl3_learner_Y0W |
An optional |
glm_formula_OR |
(Not recommended). An optional R formula object describing the conditional odds ratio. |
sl3_learner_OR |
An optional |
glm_formula_A |
(Not recommended). An optional R formula object describing the functional form of P(A=1|W). If provided, |
sl3_learner_A |
An optional |
glm_formula_Delta |
(Not recommended). An optional R formula object describing the functional form of P(Delta=1|A,W) to fit with glm. If provided, it is estimated using glm. (Not recommended. This method allows for and works best with flexible machine-learning algorithms.) |
sl3_learner_Delta |
An optional |
sl3_learner_default |
A default sl3 Learner to be used if neither a glm formula or sl3 learner is provided for one of the nuisance functions. By default, Lrnr_hal9001 is used. |
glm_formula_YZ |
A(Not recommended). An optional R formula object describing the functional form of the full conditional outcome mean P(Y=1|Z,A,W). If provided, it is estimated using glm. (Not recommended. This method allows for and works best with flexible machine-learning algorithms.) |
sl3_learner_YZ |
An optional |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.