finalpsm: Wrapper for perfoming propensity-score matching with finalfit

View source: R/finalpsm.R

finalpsmR Documentation

Wrapper for perfoming propensity-score matching with finalfit

Description

matchit is the main command of the package MatchIt, which enables parametric models for causal inference to work better by selecting well-matched subsets of the original treated and control groups. This function acts as a wrapper to facilitate propensity-score matching with a tidyverse approach.

Usage

finalpsm(
  matchit_out,
  dependent,
  explanatory = NULL,
  subclass = T,
  balance = T,
  metrics = T,
  fit = T
)

Arguments

matchit_out

Output from the finalpsm::matchit() function.

dependent

Character vector of length 1: quoted name of dependent variable. Can be continuous, a binary factor, or a survival object of form Surv(time, status).

explanatory

Character vector of any length: quoted name(s) of explanatory variables (default = NULL - the strata and explanatory variables from the matchit_out object will be used)

subclass

Logical value whether subclass should be included as a random-effect (if this form of matching is used).

balance

Logical value whether a balance table should be supplied in the output (default = T).

metrics

Logical value whether the model metrics should be supplied in the output (default = T).

fit

Logical value whether the model fit object should be supplied in the output (default = T).

Value

Nested list of the final model table, and if specified the balance table, model metrics, and model fit.


kamclean/finalpsm documentation built on Oct. 3, 2023, 3:52 a.m.