Learn R Programming

beanz (version 3.1)

bzGetSubgrpRaw: Get subgroup treatment effect estimation and variance

Description

Compute subgroup treatment effect estimation and variance from subject level data.

Usage

bzGetSubgrpRaw(
  data.all,
  var.resp,
  var.trt,
  var.cov,
  var.censor,
  resptype = c("continuous", "binary", "survival")
)

Value

A dataframe with treatment effect estimation and variance for each subgroup

Arguments

data.all

subject level dataset

var.resp

column name in data.all for response

var.trt

column name in data.all for treatment assignment

var.cov

array of column names in dat.all that corresponds to binary or ordinal baseline covaraites

var.censor

column name in data.all for censoring if the response is time to event data

resptype

type of response. The options are binary, continuous or survial

Examples

Run this code

if (FALSE) {
var.cov    <- c("sodium", "lvef", "any.vasodilator.use");
var.resp   <- "y";
var.trt    <- "trt";
var.censor <- "censor";
resptype   <- "survival";
subgrp.effect <- bzGetSubgrpRaw(solvd.sub,
                                  var.resp   = var.resp,
                                  var.trt    = var.trt,
                                  var.cov    = var.cov,
                                  var.censor = var.censor,
                                  resptype   = resptype);}

Run the code above in your browser using DataLab