pdata: Helper function for analyzing the performance of estimators

Description Usage Arguments Details Value Author(s) See Also Examples

Description

It takes the results produced by AnalyzeSimonDsgn or AnalyzeSimonDsgnAdaptN and produces a dataframe containing bias, mean square error and variance of the estimators.

Usage

1
pdata(t, design, stop, success, replicates)

Arguments

t

Dataframe containing results produced by AnalyzeSimonDsgn or AnalyzeSimonDsgnAdaptN.

stop

Taking value "yes", "no" or "both", indicating that only trials that stopped, continued or both were analyzed.

success

Taking value "yes", "no" or "both", indicating that only trials that were successful, unsuccessful or both were analyzed.

replicates

Number of trials analysed. It is equal to the number of rows in t.

Details

It is a helper function for AnalyzePerformanceSimon. It also calculates the power and the expected sample size (EN) where applicable.

Value

Dataframe containing bias, mean square error and variance of the estimators.

Author(s)

Arsenio Nhacolo

See Also

AnalyzeSimonDsgn, AnalyzeSimonDsgnAdaptN and AnalyzePerformanceSimon.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
rslt <- read.csv("ResultsOptimalDesign.csv")
nrep <- nrow(rslt)
t <- rslt
presult <- pdata(t, "Optimal", "both", "both", nrep)
t <- rslt[rslt$stop == 0,]
presult <- rbind(presult, pdata(t, "Optimal", "no", "both", nrep))

## End(Not run)

arsenionhacolo/InferenceBEAGSD documentation built on May 9, 2019, 4:10 a.m.