Description Usage Arguments Details Value References
View source: R/OutcomeModels.R
Create an outcome model, and computes the relative risk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | fitOutcomeModel(
population,
cohortMethodData = NULL,
modelType = "logistic",
stratified = FALSE,
useCovariates = FALSE,
inversePtWeighting = FALSE,
estimator = "ate",
maxWeight = 0,
interactionCovariateIds = c(),
excludeCovariateIds = c(),
includeCovariateIds = c(),
profileGrid = NULL,
profileBounds = c(log(0.1), log(10)),
prior = createPrior("laplace", useCrossValidation = TRUE),
control = createControl(cvType = "auto", seed = 1, startingVariance = 0.01, tolerance
= 2e-07, cvRepetitions = 10, noiseLevel = "quiet")
)
|
population |
A population object generated by |
cohortMethodData |
An object of type CohortMethodData as generated using
|
modelType |
The type of outcome model that will be used. Possible values are "logistic", "poisson", or "cox". |
stratified |
Should the regression be conditioned on the strata defined in the population object (e.g. by matching or stratifying on propensity scores)? |
useCovariates |
Whether to use the covariates in the |
inversePtWeighting |
Use inverse probability of treatment weighting (IPTW)? See details. |
estimator |
for IPTW: the type of estimator. Options are |
maxWeight |
for IPTW: the maximum weight. Larger values will be truncated to this
value. |
interactionCovariateIds |
An optional vector of covariate IDs to use to estimate interactions with the main treatment effect. |
excludeCovariateIds |
Exclude these covariates from the outcome model. |
includeCovariateIds |
Include only these covariates in the outcome model. |
profileGrid |
A one-dimensional grid of points on the log(relative risk) scale where the likelihood for coefficient of variables is sampled. See details. |
profileBounds |
The bounds (on the log relative risk scale) for the adaptive sampling of the likelihood function. See details. |
prior |
The prior used to fit the model. See |
control |
The control object used to control the cross-validation used to
determine the hyperparameters of the prior (if applicable). See
|
IPTW estimates either the average treatment effect (ate) or average treatment effect in the treated (att) using stabilized inverse propensity scores (Xu et al. 2010).
For likelihood profiling, either specify the profileGrid
for a completely user- defined grid, or
profileBounds
for an adaptive grid. Both should be defined on the log effect size scale. When both
profileGrid
and profileGrid
are NULL
likelihood profiling is disabled.
An object of class OutcomeModel
. Generic function print
, coef
, and
confint
are available.
Xu S, Ross C, Raebel MA, Shetterly S, Blanchette C, Smith D. Use of stabilized inverse propensity scores as weights to directly estimate relative risk and its confidence intervals. Value Health. 2010;13(2):273-277. doi:10.1111/j.1524-4733.2009.00671.x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.