Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201894

Generating random dataset fitting some conditions with R

$
0
0

I want to generate a dataset that fits some conditions to simulate the behaviour of some statistical facts in regression models.

To start with, I want a dataset compounded by a single dependent variable Y and three independent variables x1,x2,x3. I need the dataset to be larger than 40 rows (n>40) and I need x1,x2 to be linearly dependent.

I have been reading R documentation to generate random data like rnorm or sample functions, but I dont end up with anything useful.

How could I solve this?


Viewing all articles
Browse latest Browse all 201894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>