calc_dist {closeloop}R Documentation

Title To calculate distance between two studies using covariate information

Description

Title To calculate distance between two studies using covariate information

Usage

calc_dist(df, col_names, Study = "Study", Treat = "Treatment", weights, digits)

Arguments

df

A data frame consists of columns namely "Study", "Treatment", and at least one covariate.

col_names

A vector of column names specifying covariate names.

Study

A column name in a data frame named as "Study" specifying study names.

Treat

A column name in a data frame named as "Treatment" specifying treatment names.

weights

A variable in which the results of specify_weight() function was stored.

digits

A numeric value indicating the number of decimal places in the Distance calculated.

Value

Data frame

Author(s)

Shubhram Pandey shubhram1992@gmail.com

Examples

attach(exampleData)
var = c("Male","Age")
weights = specify_weight(var, weights = c(0.5,0.5))
weights
dist = calc_dist(df = exampleData, col_names = var, weights = weights,digits = 4)
dist

[Package closeloop version 0.1.0 Index]