Description Usage Arguments Details Value Author(s) Examples
Basic function for simulating bivariate data
1 2 |
cor |
The correlation coefficient between the Y and X |
means |
A vector of length two that indicates the mean of Y and X, respectively |
sds |
A vector of length two that indicates the standard deviations of Y and X, respectively |
n |
Either a single value or a vector indicating the sample size of each group |
names |
The names of the Y and X variables, respectively |
groups |
The names of the groups |
digits |
The number of digits the numeric variables should be rounded to |
cap |
The min/max values for each of the variables, to be used for truncating scores, coded as a vector. |
This can model either numeric on numeric data or categorical on numeric.
a simulated dataset
Dustin Fife
1 2 3 4 5 | fake.data = make.data(cor=.6, means=c(50, 100), sds = c(15, 15), n=100, names=c("Exam Score", "IQ"))
flexplot::flexplot(IQ~Exam.score, data=fake.data)
fake.data = make.data(means = c(10, 50, 30), sds=c(4, 15, 9), n=c(20, 26, 55), names=c("Depression", "Condition"), groups=c("Control", "Medication + Therapy", "Therapy"))
flexplot::flexplot(Depression~Condition, data=fake.data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.