gendata.mix {predmixcor} | R Documentation |
Generate binary data with Bayesian mixture models
Description
gendata.mix
generates data (both training and test data) from
Bayesian mixture model. The prior distribution of "theta" is uniform(0,1). The value
of "alpha" is given by argument alpha
, which controls the the overall
relationship between the response and the predictor variables.
Usage
gendata.mix (n1,n2,m1,m2,p,alpha,prob.y=c(0.9,0.1))
Arguments
n1 |
the number of class 1 in training data |
n2 |
the number of class 2 in training data |
m1 |
the number of class 1 in test data |
m2 |
the number of class 2 in test data |
p |
the number of features |
alpha |
a parameter controlling the dependency between the features and the
response |
prob.y |
a vector of two elements specifying the probabilities of the response
being 1 in each group |
Value
train |
the training data, with the row standing for the cases and the
first column being the response |
test |
the test data, of the same format as "train" |
See Also
train_predict_mix
[Package
predmixcor version 1.1-1
Index]