estimate_pmf {drord} | R Documentation |
Get 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.
Description
Get 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.
Usage
estimate_pmf(
out,
treat,
covar,
out_levels,
out_form = NULL,
out_model,
treat_prob_est,
stratify = FALSE,
return_models = TRUE,
...
)
Arguments
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). |
Value
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.