macroEvaluation: Macro Evaluation

Description Usage Arguments Details Value Author(s) Examples

Description

The macro evaluation gives a short summary of all analysis performed for a single replicate of data.

Usage

1
2
3
4
macroEvaluation(data, 
  macroCode, 
  interimCol = getEctdColName("Interim") , 
  doseCol = getEctdColName("Dose"))

Arguments

data

(Required) Data set to use, typically returned from a micro evaluation step.

macroCode

(Required) Function used to summarize the micro data. If the function has arguments "doseCol" and/or "interimCol", the arguments to macroEvaluation are passed to it in addition to the data

interimCol

(Optional) Name of the interim column, should be a valid name ("INTERIM" by default). See validNames

doseCol

(Optional) Name of the dose column, should be a valid name ("DOSE" by default). See validNames

Details

The macro code is first studied to make sure that it is a function that takes a data argument. The code is then executed against the micro data, and should produce a data frame containing a single row. This is further checked using the checkMacroFormat function.

Value

A data frame that complies with checkMacroFormat

Author(s)

Mike K Smith mstoolkit@googlemail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  # example of micro data with interim
  microData <- read.csv( 
    system.file( "Runit", "data", "macroEvaluation", "micro0001.csv" , package = "MSToolkit") ) 
  mCode <- function(data) {
    diffMeans <- data$MEAN[ data$DOSE == 100 & data$INTERIM == 0] - 
    data$MEAN[ data$DOSE == 0 & data$INTERIM == 0  ]
    data.frame( SUCCESS = diffMeans > 10, NFINAL = sum(data$N) )
  }
  out <- macroEvaluation( microData, mCode)
  stopifnot( nrow(out) == 1 )
    

MSToolkit documentation built on May 2, 2019, 6:30 p.m.