findTrialByQuantile: Find Trial by Quantile

View source: R/analyzeSim.r

findTrialByQuantileR Documentation

Find Trial by Quantile

Description

This function returns the trial number (index) with a terminal value that matches the quantile (qTile). So, qTile == 0 will identify which trial has the lowest value, 1 the highest, and 0.5 the median. If more than one trial has the same terminal value, the function returns the trial that has that terminal value earliest. So, if the quantile of the terminal values is 0, and there are multiple trials that terminate with 0, the function returns the trial which ends with 0 earliest.

Usage

findTrialByQuantile(sim, simResult, qTile)

Arguments

sim

Simulation object.

simResult

Name of item in sim with results (class = 'simResult')

qTile

Quantile (0 - 1) of terminal value

Value

Integer representing which trial terminates with the qTile value.

Examples

## Not run: findTrialByQuantile(sim, simResult, qTile)

rexmacey/aasim documentation built on Oct. 29, 2024, 9:30 a.m.