rbinorm {FamilyRank} | R Documentation |
Bimodal Normal Distribution
Description
Simulates random data from a bimodal Gaussian distribution.
Usage
rbinorm(n, mean1, mean2, sd1, sd2, prop)
Arguments
n |
Number of observations to simulate |
mean1 |
Mean of mode 1 |
mean2 |
Mean of mode 2 |
sd1 |
Standard deviation of mode 1 |
sd2 |
Standard deviation of mode 2 |
prop |
Probability of being in mode 1. |
Details
This function is modeled off of the rnorm
function.
Value
Generates random deviates
Author(s)
Michelle Saul
Examples
## Generate 100 samples from a two component Guassian curve
samples <- rbinorm(n=100, mean1=10, mean2=20, sd1=1, sd2=2, prop=.5)
## Plot distribution of simulated data
plot(density(samples))
[Package FamilyRank version 1.0 Index]