A shiny based web app that allows you to explore your researcher degrees of freedom's specification curve interactively.
Usage
shiny_rdf_spec_curve(
ests,
spec_curve_parms,
spec_curve_selected = NULL,
design = NULL,
rel_dir = NULL,
start_input = NULL,
libs = NULL,
add_files = NULL,
regression_cutoff = 5,
model_render_func = NULL,
default_choices = NULL,
restore_button = FALSE,
title = "A Shiny Specification Curve",
abstract = NULL,
choice_labels = NULL,
with_spinner = FALSE,
spinner_options = list()
)
Arguments
- ests
The data frame provided by
exhaust_design
.- spec_curve_parms
A list containing additional parameters that will be passed on to
plot_rdf_spec_curve
. You can also provide a named list of lists with each list containing parameters for a specification curve. In this case, the shiny app will include an additional Select Input element where the users can select which specification curve to display.- spec_curve_selected
If you provide a named list of specification curves in
spec_curve_parms
, you can provide here the name of the default curve to plot first.- design
if not
NULL
it takes the design that was used to generate the estimates. In this case, you either need to have all required design elements in your current environment or you need to specify therel_dir
parameter pointing to the code files below. In addition, you need to setstart_input
. The shiny app will then display regression results when you select choices that generate less thanregression_cutoff
estimates.- rel_dir
The path to the code directory where the design functions are located. Only needed when the functions are loaded to your current environment See above.
- start_input
The parameters that you pass to the first design step. See above.
- libs
A vector containing additional packages that need to be attached to run the design. NOTE: This will modify the shiny app code to include literal
library()
calls so that shinyapps.io includes the libraries on deployment.- add_files
A character vector containing relative paths to files and directories that you want to bundle with the shiny app. The files will be copied to the temporary directory that hosts the shiny app and directories will be copied recursively.
- regression_cutoff
If your choices generate less or equal estimates, the display will switch to normal regression table output (needs parameters above to be not
NULL
).- model_render_func
A function to create the regression table, taking a list of the models as parameter. The function is evaluated within the shiny app environment. By default (
NULL
), the regressions are rendered by calling the internal functionrenderModels()
that then callsmodelsummary
to create the HTML output. If you need to prep the model data for preparation, you can provide a function here that callsrenderModels()
after prepping the data. Alternatively, you can provide a function that generates the HTML output directly.- default_choices
A list containing choices that you want the app to start with. If
NULL
, it will start with all choices included.- restore_button
Set to
TRUE
when you want to have a restore button in the app (defaults toFALSE
).- title
The title of the shiny app.
- abstract
Text that will be displayed by the app. Wrapped into
HTML()
so that you can use HTML code.- choice_labels
Character vector containing the labels that will be used to label the select list input controls in the shiny app. If
NULL
, the select list input controls are labeled based on the choice column names from theests
data frame.- with_spinner
Do you want to include a spinner (useful when displays take some time to render). Defaults to
FALSE
. SeewithSpinner
for detail.- spinner_options
A list containing parameters that you want to to pass to
withSpinner
.
Examples
if (FALSE) {
print("Sorry. No examples yet.")
}