test_predictions {target} | R Documentation

## Test the ECDF ranks of groups are from same distribution

### Description

Test whether the cumulative distribution function of two groups are drawn from the same distribution.

### Usage

    test_predictions(rank, group, compare, ...)

### Arguments

`rank` | A numeric vector
`group` | A factor of length equal that of rank
`compare` | A character vector of length two
`...` | Other arguments passed to ks.test

### Value

An htest object

### Examples

    # generate random values
    rn1 <- rnorm(100)
    rn2 <- rnorm(100, 2)
    e <- c(rn1, rn2)

    # generate grouping variable
    g <- rep(c('up', 'down'), times = c(length(rn1), length(rn2)))

    # test
    test_predictions(e,
                     group = g,
                     compare = c('up', 'down'))

[Package target version 1.2.0 Index]