Learn R Programming

MPV (version 1.64)

rftest: Pseudorandom Number Testing via Random Forest

Description

Given a sequence of pseudorandom numbers, this function constructs a random forest prediction model for successive values, based on previous values up to a given lag. The ability of the random forest model to predict future values is inversely related to the quality of the sequence as an approximation to locally random numbers.

Usage

rftest(u, m=5)

Value

Side effect is a two way layout of graphs showing effectiveness of prediction on a training and a testing subset of data. Good predictions indicate a poor quality sequence.

Arguments

u

numeric, a vector of pseudorandom numbers to test

m

numeric, number of lags to test

Author

W. John Braun

Examples

Run this code
    x <- runif(200)
    rftest(x, m = 4)

Run the code above in your browser using DataLab