Skip to content

Commit

Permalink
Update 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpereztr committed Jul 31, 2021
1 parent 0d86872 commit ce1cea0
Show file tree
Hide file tree
Showing 22 changed files with 165 additions and 958 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
Imports: DT, shiny, shinythemes, survival, idefix, writexl, shinyjs,
MASS, stats, shinyhelper, shinycssloaders, shinyglide,
htmltools, stringr, commonmark, bslib, mlogit
Suggests: rmarkdown, knitr
VignetteBuilder: knitr
htmltools, stringr, commonmark, bslib, mlogit, readxl
Suggests: rmarkdown, R.rsp
VignetteBuilder: R.rsp
NeedsCompilation: no
Packaged: 2021-06-05 10:23:33 UTC; danie
Packaged: 2021-07-20 07:30:22 UTC; danie
Author: Daniel Perez Troncoso [aut, cre]
(<https://orcid.org/0000-0003-0091-8148>)
Maintainer: Daniel Perez Troncoso <[email protected]>
674 changes: 0 additions & 674 deletions LICENSE

This file was deleted.

7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ importFrom(mlogit,mlogit)
importFrom(mlogit,mlogit.data)
importFrom(shiny,HTML)
importFrom(shiny,actionButton)
importFrom(shiny,br)
importFrom(shiny,checkboxInput)
importFrom(shiny,column)
importFrom(shiny,conditionalPanel)
importFrom(shiny,downloadButton)
importFrom(shiny,downloadHandler)
importFrom(shiny,em)
importFrom(shiny,fluidPage)
importFrom(shiny,fluidRow)
importFrom(shiny,h3)
importFrom(shiny,h4)
importFrom(shiny,hr)
importFrom(shiny,icon)
Expand All @@ -39,16 +42,20 @@ importFrom(shiny,sidebarLayout)
importFrom(shiny,sidebarPanel)
importFrom(shiny,tabPanel)
importFrom(shiny,tableOutput)
importFrom(shiny,tabsetPanel)
importFrom(shiny,tags)
importFrom(shiny,textAreaInput)
importFrom(shiny,textInput)
importFrom(shiny,textOutput)
importFrom(shiny,uiOutput)
importFrom(shiny,updateTabsetPanel)
importFrom(shiny,verbatimTextOutput)
importFrom(shinycssloaders,withSpinner)
importFrom(shinyglide,glide)
importFrom(shinyglide,screen)
importFrom(shinyglide,screenOutput)
importFrom(shinyhelper,helper)
importFrom(shinyhelper,observe_helpers)
importFrom(shinyjs,useShinyjs)
importFrom(shinythemes,shinytheme)
importFrom(stats,as.formula)
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
v 0.3.1 - Fixed a bug that prevented the survey from advancing to the next respondent.


v 0.3.1 - Fixed a bug that prevented the survey from advancing to the next respondent. Many minor changes introduced.

v 0.3.0 - Price can be coded as a linear variable. Mixed logit (RPL) was included. Bugs fixed

Expand Down
166 changes: 114 additions & 52 deletions R/app.r

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion R/helpfiles/upload_help.md

This file was deleted.

11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
# DCEtool
Complete package for creating, surveying, and analysing Discrete Choice Experiments

## How to run it?
* From GitHub
`install.packages("devtools")`
`library(devtools)`
`install_github("danielpereztr/DCEtool")`
`library(DCEtool)`
`DCEtool()`
* Via CRAN (in RStudio)
`install.package("DCEtool")`
`library(DCEtool)`

## The app
This app is intended to be a complete package for creating, surveying, and analysing discrete choice experiments. Although all these functionalities are available, the app can also be used only to obtain the design of a discrete choice experiment.

Expand Down
Binary file modified build/partial.rdb
Binary file not shown.
Binary file modified build/vignette.rds
Binary file not shown.
9 changes: 0 additions & 9 deletions inst/doc/DCEtool.R

This file was deleted.

21 changes: 0 additions & 21 deletions inst/doc/DCEtool.Rmd

This file was deleted.

163 changes: 0 additions & 163 deletions inst/doc/DCEtool.html

This file was deleted.

Binary file added inst/doc/main.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions inst/doc/main.pdf.asis
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%\VignetteIndexEntry{DCEtool}
%\VignetteEngine{R.rsp::asis}
2 changes: 1 addition & 1 deletion man/DCEtool.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\name{DCEtool}
\alias{DCEtool}
\title{Complete package for creating, surveying, and analysing Discrete Choice Experiments}
\title{Efficient and Accessible Experimental Designs for Discrete Choice Experiments: DCEtool}
\description{This app is intended to be a complete package for creating, surveying, and analysing discrete choice experiments. Although all these functionalities are available, the app can also be used only to obtain the design of a discrete choice experiment.

Introduce the parameters of the DCE in the 'Parameters' tab. Suppose you want to enter the first attribute in Table 1 of this article \doi{10.1016/j.jval.2016.04.004}. To do this, enter 'Efficacy' under 'Name of the attribute', '3' under 'Number of levels' and 'L1,L2,L3' under 'Levels' name'. Once you click on 'Add,' you will see the attribute appear on the right table. Try including more attributes. Once you have more then two attributes, enter the number of alternatives per choice set, the number of choice sets per respondent, choose if you want a null choice, and click on 'Save inputs'.
Expand Down
Binary file added man/www/Antioquia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 0 additions & 21 deletions vignettes/DCEtool.Rmd

This file was deleted.

12 changes: 12 additions & 0 deletions vignettes/helpfiles/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The `Load example data` button loads the following selection of attributes and levels:

| Attributes | Levels |
| ----------------- | -------------------------------------------------------- |
| Effectiveness (%) | 70, 80, 90 |
| Doses | 1 dose, 2 doses |
| Adverse events | 1 in 1000 patients, 1 in 500 patients, 1 in 100 patients |
| Price (€) | 100, 150, 200 |



In the cost/price attributes, it is highly recommended to avoid writting the unit next to the value.
3 changes: 3 additions & 0 deletions vignettes/helpfiles/levnames.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
If the user is introducing the attribute `Price (€)` with three levels corresponding to 100, 150, and 200, the input in `levels' names` should be:

100,150,200
16 changes: 16 additions & 0 deletions vignettes/helpfiles/priors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Usually, the priors are obtained from pilot experiments. If no priors are available, or the user is creating a pilot experiment, the drop-down list should specify "Zero (pilot design)". However, if the user knows some prior values, the drop-down list can be changed to "Personalized priors".

When "Personalized priors" are selected, the textbox below needs to contain the prior parameters in order and separated by commas. To introduce the prior parameters, the user needs to remember that:

- The number of parameters should be equal to l-k (+1 if there is an opt-out alternative) [where l is the total number of levels and k is the total number of parameters]
- If there is an op-out option, the prior coefficient of the null option should go in first place.
- The rest of parameters must be written in the same order in which the attributes and levels were specified.
- A comma must be written between each coefficient.
- The coefficient of the first level of each attribute must be always omitted (in dummy coding, this coefficient is always constricted to zero)

The following example can be applied to the example attributes and levels with a null option:

| null | effect_80 | effect_90 | doses_2 | adv_1in500 | adv_1in100 | cost_150 | cost_200 |
| ----- | --------- | --------- | ------- | ---------- | ---------- | -------- | -------- |
| -0.5, | 0.5, | 1.2, | -0.1, | -0.2, | -0.7, | -0.1, | -0.6 |

1 change: 1 addition & 0 deletions vignettes/helpfiles/seed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use and remember any integer number to get the same design when the same seed is used.
2 changes: 2 additions & 0 deletions vignettes/main.pdf.asis
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%\VignetteIndexEntry{DCEtool}
%\VignetteEngine{R.rsp::asis}

0 comments on commit ce1cea0

Please sign in to comment.