define_single_regression: Directly specify a single regression model

Description Usage Arguments

View source: R/main_estimation.R

Description

This function provides an alternative way to manually define parts of the propsensity score model with formula/strata and model controls. This function is for advanced users. It provides explicit and manual control over every single model fit, e.g., every strata of the exposure propensity score.

Usage

1
2
3
4
5
6
7
8
9
define_single_regression(
  OData,
  regforms,
  stratify = NULL,
  models = NULL,
  fit_method = stremrOptions("fit_method"),
  fold_column = stremrOptions("fold_column"),
  ...
)

Arguments

OData

OData Input data object created by importData function.

regforms

Regression formula, only main terms are allowed.

stratify

Expression(s) for creating strata(s) (model will be fit separately on each strata)

models

Optional parameter specifying the models with gridisl R package. Must be an object of class ModelStack specified with gridisl::defModel function.

fit_method

Model selection approach. Can be "none" - no model selection, "cv" - V fold cross-validation that selects the best model according to lowest cross-validated MSE (must specify the column name that contains the fold IDs).

fold_column

The column name in the input data (ordered factor) that contains the fold IDs to be used as part of the validation sample. Use the provided function define_CVfolds to define such folds or define the folds using your own method.

...

Additional parameters that will be passed down directly to the modeling function.


osofr/estimtr documentation built on Jan. 25, 2022, 8:05 a.m.