Skip to contents

This example utilizes the prop.test function in base R to perform the analysis. The p-value from prop.test is used to compute the Z statistic that is compared to the upper boundary computed and sent by East as an input. This example does NOT include a futility rule.

Usage

AnalyzeUsingPropTest(SimData, DesignParam, LookInfo, UserParam = NULL)

Arguments

SimData

Data frame which consists of data generated in current simulation.

DesignParam

List of Design and Simulation Parameters required to perform analysis.

LookInfo

List containing Design and Simulation Parameters, which might be required to perform analysis.

UserParam

A list of user defined parameters in East. The default must be NULL.

Value

TestStat A double value of the computed test statistic

Decision An integer value: Decision = 0 --> No boundary crossed Decision = 1 --> Lower Efficacy Boundary Crossed Decision = 2 --> Upper Efficacy Boundary Crossed Decision = 3 --> Futility Boundary Crossed Decision = 4 --> Equivalence Boundary Crossed

ErrorCode An integer value: ErrorCode = 0 --> No Error

Details

Analyze using the prop.test function in base R.

Note

Helpful Hints: There is often info that East sends to R that are not shown in a given example. It can be very helpful to save the input objects and then load them into your R session and inspect them. This can be done with the following R code in your function.

saveRDS( SimData, "SimData.Rds") saveRDS( DesignParam, "DesignParam.Rds" ) saveRDS( LookInfo, "LookInfo.Rds" )

The above code will save each of the input objects to a file so they may be examined within R.