generate_norm | R Documentation |
This function generates truncated normal scores using the 'rtruncnorm' function from the 'truncnorm' package.
generate_norm(n_voters, n_candidates, min = 0, max = 1, mean = 0.5, sd = 0.25)
n_voters |
The number of voters to generate scores for. |
n_candidates |
The number of candidates to generate scores for. |
min |
The minimum value of the truncated normal distribution. |
max |
The maximum value of the truncated normal distribution. |
mean |
The mean of the truncated normal distribution. |
sd |
The standard deviation of the truncated normal distribution. |
A matrix of scores with 'n_candidates' rows and 'n_voters' columns.
voting_situation<- generate_norm(n_voters=10, n_candidates=3, min=0, max=10, mean=0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.