mardi 5 novembre 2019

Generating random dataset fitting some conditions with R

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

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?




Aucun commentaire:

Enregistrer un commentaire