exact_dist: Calculate the exact distribution of number of detections of a...

View source: R/p_value.R

exact_distR Documentation

Calculate the exact distribution of number of detections of a lineup

Description

This function calculates the exact distribution of number of detections of a lineup assuming every subject selects exactly one plot.

Usage

exact_dist(n_eval, n_plot = 20, dist = "dirichlet", alpha = 1)

Arguments

n_eval

Integer. Number of evaluations.

n_plot

Integer. Number of plots in the lineup.

dist

Character. Name of the distribution used for the attractiveness model. Currently, this can only be "dirichlet".

alpha

Numeric. A single parameter value used by the Dirichlet distribution.

Details

For a given lineup, plots are assumed to have weights W_i, i = 1, ..., M, where M is the number of plots, and W_i follows a attractiveness distribution independently.

Currently, this function only supports Dirichlet distribution as the attractiveness distribution. Dirichlet distribution ensures the probability of every plot being selected is evenly distributed in a standard M - 1 simplex.

Value

A named vector representing the probability mass function of the distribution.

Examples


# The first person select 2 plots, the second one select 2 plots and
# the third one select 3 plots.
sim_dist(c(2,2,3))


TengMCing/visage documentation built on Aug. 28, 2024, 3:27 p.m.