randomise: Randomised group of items

View source: R/randomise.R

randomiseR Documentation

Randomised group of items

Description

Set a randomised group of items for crowdsourcing citizen science. Generate designs for ranking of options. It is designed for tricot trials specifically (comparing 3 options), but it will also work with comparisons of any other number of options. The design strives for approximate A optimality, this means that it is robust to missing observations. It also strives for balance for positions of each option. Options are equally divided between first, second, third, etc. position. The strategy is to create a "pool" of combinations that does not repeat combinations and is A-optimal. Then this pool is ordered to make subsets of consecutive combinations also relatively balanced and A-optimal

Usage

randomise(
  npackages,
  itemnames,
  ncomp = 3,
  availability = NULL,
  proportions = NULL,
  ...
)

Arguments

npackages

an integer for the number of trial packages to be produced

itemnames

a character for the name of items tested in the project

ncomp

an integer for the number of items to be assigned to each package

availability

optional, a vector with integers indicating the number of packages available for each itemnames

proportions

optional, a numeric vector with the desired proportions for each itemnames

...

additional arguments passed to methods

Value

A dataframe with the randomised design

Author(s)

Jacob van Etten

References

Bailey and Cameron (2004). Combinations of optimal designs. https://webspace.maths.qmul.ac.uk/l.h.soicher/designtheory.org/library/preprints/optimal.pdf

Examples

ncomp <- 3
npackages <- 20
itemnames <- c("apple","banana","grape","mango", "orange")
availability <- c(5, 8, 50, 50, 50)

randomise(ncomp = ncomp,
          npackages = npackages,
          itemnames = itemnames)

randomise(ncomp = ncomp,
          npackages = npackages,
          itemnames = itemnames,
          availability = availability)
          

ClimMobTools documentation built on Sept. 23, 2022, 1:06 a.m.