fit_trt_spec_reg, which
fits the proportion odds model in a given treatment arm.R/nuisance_fn.R
estimate_pmf.RdGet a treatment-specific estimate of the conditional PMF.
Essentially this is a wrapper function for fit_trt_spec_reg, which
fits the proportion odds model in a given treatment arm.
estimate_pmf( out, treat, covar, out_levels, out_form = NULL, out_model, treat_prob_est, stratify = FALSE, return_models = TRUE, ... )
| out | A |
|---|---|
| treat | A |
| covar | A |
| out_levels | A |
| out_form | The right-hand side of a regression formula for the working proportional odds model. NOTE: THIS FORMULA MUST NOT SUPPRESS THE INTERCEPT. |
| out_model | Which R function should be used to fit the proportional odds
model. Options are |
| treat_prob_est | Estimated probability of treatments, output from call
to |
| stratify | Boolean indicating whether to use nonparametric maximum likelihood
(i.e., a stratified estimator). If |
| return_models | If |
| ... | Other options (not used). |
A list with fm the fitted model for treatment 1 and 0 (or, if
!return_models then NULL) and pmf the estimated PMF
under treatment 1 and 0 evaluated on each observation.