Learn R Programming

confidenceSim (version 0.1.0)

getSuffStats: Get Sufficient Statistics

Description

Get sufficient statistics from trial data necessary to perform primary analysis

Usage

getSuffStats(datlist)

Value

List of sufficient statistics

  • num.enrolled

  • num.known

  • num.uknown

  • num.resp

  • num.fail

  • resprate

  • formattedrate

Arguments

datlist

The current data list at the point of analysis generated from getCurrentData. The list must have a KNOWN field.

Details

Given a data list, this checks if the responses are binary (two types of responses), ordinal (more than 2 or less than 30 different response types) or continuous (other). If continuous, mean and standard deviations are returned. This code is not necessarily used in singleTrial since the perpetual functionality was introduced as there are additional methods to retrieve the statistics necessary to perform the analysis that take into account the possibility that arms have been dropped or added.

Examples

Run this code
# load data set
data(datlist)
looks <- seq(500,1000,100)
# first interim analysis
n.at.look = looks[1]
looktime.interim = datlist$arrival.day[n.at.look]
currdatlist.interim <- getCurrentData(datlist, looktime.interim, n.at.look, as.followup=TRUE)
suffStats  <- getSuffStats(currdatlist.interim)

Run the code above in your browser using DataLab