Given a vector of data this function will simulate data that could have come from that vector.
simvar(x, n = 10, method = "grid")
data vector
desired number of points (will not always be achieved)
grid simulation method. See details.
There are three methods to choose from:
nonaligned (default): grid + some random peturbation
grid: grid of evenly spaced observations. If a factor, all levels in a factor will be used, regardless of n
random: a random uniform sample from the range of the variable