Title: Efficient and Accessible Discrete Choice Experiments
Version: 1.2.0
Description: Design, conduct and analyze 'DCEs' from a virtual interface in shiny. Reference: Perez-Troncoso, D. (2022) https://github.com/danielpereztr/DCEtool.
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.2
Depends: survival, shinyBS, shinycssloaders
Imports: shiny, shinyWidgets, mvtnorm, DT, writexl, readxl, idefix, ggplot2, magrittr, remotes, rlist, shinyhelper, usethis, htmltools
Suggests: tidyr, mlogit, knitr, dfidx, adjustedcranlogs, MASS, httr, markdown, shinyjs
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2025-07-21 13:00:03 UTC; danie
Author: Daniel Perez Troncoso ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2025-07-21 13:31:46 UTC
Maintainer: Daniel Perez Troncoso <dpereztr@gmail.com>

Efficient and Accessible DCEs: DCEtool

Description

Design, conduct, and analyze discrete choice experiments from a visual interface.

Usage

DCEtool()

Value

Use the visual interface to generate, load and download designs and data bases.

Examples

## Not run: 

  DCEtool()
  
  
## End(Not run)

Generate Efficient Optimal and Bayesian DCEs

Description

Generates experimental designs for DCEs. (Backend of DCEtool) .

Usage

  dce_toolbox(attributes, csets, alts, nochoice, priors, alg)

Arguments

attributes

A vector where each number represents an attribute and its values the number of levels.

csets

An integer indicating the number of sets in the DCE.

alts

An integer indicating the number of alternatives in each set.

nochoice

A boolean indicating whether there is an opt-out option (TRUE) or not (FALSE)

priors

A vector indicating the prior parameters of the conditional logit model.

alg

A string indicating the optimization algorithm: "cea" or "fedorov".

Value

design

The design matrix

DB-error

The Bayesian D-error if the optimization algorithm is "cea"

D-error

The D-error if the optimization algorithm is "fedorov"

details

A string compiling the details of the procedure

Examples

## Not run: 
  dce_toolbox(attributes = c(2,3), csets = 12,
                              alts = 2, nochoice = FALSE,
                              priors = c(0,0,0), alg = "fedorov")

## End(Not run)

Select members of a list that match given regex pattern

Description

Select members of a list that match given regex pattern

Usage

list.match(.data, pattern, ...)

Arguments

.data

A list or vector

pattern

character. The regex pattern to match the name of the members

...

Additional parameters to pass to grep

Examples

x <- list(p1 = list(type='A',score=list(c1=10,c2=8)),
       p2 = list(type='B',score=list(c1=9,c2=9)),
       p3 = list(type='B',score=list(c1=9,c2=7)))
list.match(x,'p[12]')
list.match(x,'3')