1
$\begingroup$

I want to generate some data . For example I would generate three variables.2 Independent,1 dependent.

$\endgroup$
2
$\begingroup$

Generating data needs software to do. R is a free software tool that is frequently used for such purposes. It offers a number of functions for random numbers from different distributions

runif for random numbers from uniform distributions

rnorm for random numbers from normal distribution

The following should fulfill the job in the question:

first <- rnorm(100, mean = 100, sd = 10)
second <- runif(100, min = 0, max = 100)
dependent <- 2*first + 3*second + runif(100)
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.