gatherParameters: Extracts the parameters from the simulation()-Object

Description Usage Arguments Value Author(s) Examples

View source: R/simulationList.R

Description

Basically, it is a helper function for gatherStatistics(). It extracts the parameters from the simObject$results and creates a data.frame from this. Every used parameter gets its own column. Every row corresponds to one object in simObject$results. If a object A from simObject$results does not contain a parameter P that another object B does, then the row for object A will have "" in the column for the parameter P.

Usage

1
gatherParameters(simObject)

Arguments

simObject

An object returned by simulation()

Value

A data.frame with rows for every object in simObject$results and columns for the used parameter.

Author(s)

MarselScheer

Examples

1
2
3
4
5
6
7
8
9
#' # this function generates pValues 
myGen <- function(n, n0) list(procInput=list(pValues = c(runif(n-n0, 0, 0.01), runif(n0))), groundTruth = c(rep(FALSE, times=n-n0), rep(TRUE, times=n0)))

# need some simulation()-Object I can work with 
sim <- simulation(replications = 3, list(funName="myGen", fun=myGen, n=200, n0=c(50,100)), 
list(list(funName="BH", fun=function(pValues, alpha) BH(pValues, alpha, silent=TRUE), alpha=c(0.25, 0.5)),
list(funName="holm", fun=holm, alpha=c(0.25, 0.5),silent=TRUE)))

gatherParameters(sim)

mutoss documentation built on May 2, 2019, 5:56 p.m.