moPropen {DynTxRegime}R Documentation

Defining the moPropen Input Variable

Description

Several of the statistical methods implemented in package DynTxRegime use propensity score modeling. This section details how this input is to be defined.

Details

For input moPropen, the method specified to obtain predictions MUST return the prediction on the scale of the probability, i.e., predictions must be in the range (0,1). In addition, moPropen differs from standard "modelObj" objects in that an additional element may be required in predict.args. Recall, predict.args is the list of control parameters passed to the prediction method. An additional control parameter, propen.missing can be included. propen.missing takes value "smallest" or "largest". It will be required if the prediction method returns predictions for only a subset of the treatment data; e.g., predict.glm(). propen.missing indicates if it is the smallest or the largest treatment value that is missing from the returned predictions.

For example, fitting a binary treatment (A in {0,1}) using

  moPropen <- buildModelObj(model = ~1,
                            solver.method = 'glm',
                            solver.args = list('family'='binomial'),
                            predict.method = 'predict.glm',
                            predict.args = list(type='response'))

returns only P(A=1). P(A=0) is "missing," and thus

  moPropen <- buildModelObj(model = ~1,
                            solver.method = 'glm',
                            solver.args = list('family'='binomial'),
                            predict.method = 'predict.glm',
                            predict.args = list(type='response',
                                                propen.missing = 'smallest'))

If the dimension of the value returned by the prediction method is less than the number of treatment options and no value is provided in propen.missing, it is assumed that the smallest valued treatment option is missing. Here, 'smallest' indicates the lowest value integer if treatment is an integer, or the 'base' level if treatment is a factor.


[Package DynTxRegime version 4.15 Index]