ps.covariate.statistics: Covariate Summary Matrix

Description Usage Arguments Details Value Examples

Description

Calculate the summary statistics for covariates

Usage

1
2
ps.covariate.statistics(data, covariates, weights = NULL, outputs = c("all",
  "dichotomous", "continuous"))

Arguments

data

Data Frame - containing the dataset with previously calculated weights or matches. The data frame must contain a treatment indicator variable called 'treat'.

covariates

Vector - containing the set of covariates for which to evaluate statistics.

weights

Vector, containing the weights to use in evaluating statistics for population. Defaults to equal weighting.

outputs

String - indicates which covariate type(s) to output. Accepted inputs are "all" (Default), "dichotomous", and "continuous"

Details

This function calculates a variety of summary statistics and organizes them into a matrix. Included summary statistics are the mean and sd in the treatment and control populations, the difference in means between the treat and control populations and the standardized difference of the means between the populations.

Value

Matrix - containing summary statistics for covariates

Examples

1
2
3
4
5
6
7
## Not run: 
ps.covariate.statistics(myData, covariates)
ps.covariate.statistics(myData, covariates, weights = myData$weights)
ps.covariate.statistics(myData, covariates, weights = myData$is_matched)
ps.covariate.statistics(myData, covariates, outputs = "dichotomous")

## End(Not run)

OHDSI/Centaur documentation built on May 7, 2019, 8:22 p.m.