powered by
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)
A matrix of scores with 'n_candidates' rows and 'n_voters' columns.
The number of voters to generate scores for.
The number of candidates to generate scores for.
The minimum value of the truncated normal distribution.
The maximum value of the truncated normal distribution.
The mean of the truncated normal distribution.
The standard deviation of the truncated normal distribution.
voting_situation<- generate_norm(n_voters=10, n_candidates=3, min=0, max=10, mean=0.7)
Run the code above in your browser using DataLab