simvar: Simulate observations from a vector

View source: R/data.r

simvarR Documentation

Simulate observations from a vector

Description

Given a vector of data this function will simulate data that could have come from that vector.

Usage

simvar(x, n = 10, method = "grid")

Arguments

x

data vector

n

desired number of points (will not always be achieved)

method

grid simulation method. See details.

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


classifly documentation built on May 20, 2022, 9:06 a.m.

Related to simvar in classifly...