
Doubly robust estimator of the average treatment effect for count data
Source:R/ATE_count.R
drcount.RdDoubly robust estimator of the average treatment effect between two treatments, which is the rate ratio of treatment 1 over treatment 0 for count outcomes.
Usage
drcount(
y,
trt,
x.cate,
x.ps,
time,
ps.method = "glm",
minPS = 0.01,
maxPS = 0.99,
interactions = TRUE
)Arguments
- y
A numeric vector of size
nwith each element representing the observed count outcome for each subject.- trt
A numeric vector (in {0, 1}) of size
nwith each element representing the treatment received for each subject.- x.cate
A numeric matrix of dimension
nbyp.catewith each column representing each baseline covariate specified in the outcome model for all subjects.- x.ps
A numeric matrix of dimension
nbyp.ps + 1with a leading column of 1 as the intercept and each remaining column representing each baseline covariate specified in the propensity score model for all subjects.- time
A numeric vector of size
nwith each element representing the log-transformed person-years of follow-up for each subject.- ps.method
A character value for the method to estimate the propensity score. Allowed values include one of:
'glm'for logistic regression with main effects only (default), or'lasso'for a logistic regression with main effects and LASSO penalization on two-way interactions (added to the model if interactions are not specified inps.model). Relevant only whenps.modelhas more than one variable.- minPS
A numerical value between 0 and 1 below which estimated propensity scores should be truncated. Default is
0.01.- maxPS
A numerical value between 0 and 1 above which estimated propensity scores should be truncated. Must be strictly greater than
minPS. Default is0.99.- interactions
A logical value indicating whether the outcome model should allow for treatment-covariate interaction by
x. IfTRUE, interactions will be assumed only if at least 10 patients received each treatment option. Default isTRUE.