powered by
Generate data points with a linear relationship.
linear_data(n = 100, a = -3, b = 3)
A data frame with three variables. Variable 'y = 0.6 * x1 + 0.3 * x2
0.1 * x3' is the response, and 'x1', 'x2' and 'x3' are uniform random variables between a and b.
Number of data points.
Lower and upper bound of the uniform distribution.
xy <- linear_data(n = 30, a = -1, b = 1)
Run the code above in your browser using DataLab