generate_norm {voteSim}R Documentation

Generate truncated normal scores

Description

This function generates truncated normal scores using the 'rtruncnorm' function from the 'truncnorm' package.

Usage

generate_norm(n_voters, n_candidates, min = 0, max = 1, mean = 0.5, sd = 0.25)

Arguments

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.

Value

A matrix of scores with 'n_candidates' rows and 'n_voters' columns.

Examples

voting_situation<- generate_norm(n_voters=10, n_candidates=3, min=0, max=10, mean=0.7)

[Package voteSim version 0.1.1 Index]