rmreg
returns an X matrix, a y vector and the cluster labels generated randomly with a Mixture of regression model.
A numeric value the size of the graph to generate
A numeric vector of length K with clusters proportions (must sum up to 1)
A numeric matrix of dim K x d with the regression coefficient
A numeric of length 1 with the target conditional variance
A matrix of covariate
A list with fields:
X: the covariate matrix
y: the target feature
K: number of generated clusters
N: sample size
cl: vector of clusters labels
pi: clusters proportions
A: regression coefficients used in the simulation
sigma: conditional variance
It takes the sample size, cluster proportions and regression parameters matrix and variance as input accordingly