insightsengineering / insightsengineering/teal.modules.general

Changing distribution parameter does not change anything when group by is applied

Open
#322 9 comments 0 reactions 0 assignees View on GitHub
bug core discussion
Dominant language
R
Stars
16
Forks
23
PR merge metrics
No merged PRs in 30d

Description

When group by is applied distribution parameters seem not to do anything. What I understand it only controls curve representing theoretical distribution which disappears when group_by is applied.
```r
devtools::load_all("~/nest/teal/")
devtools::load_all("~/nest/teal.devel/")
devtools::load_all("~/nest/teal.modules.general/")
library(scda)
ADSL <- synthetic_cdisc_data("latest")$adsl
#'
vars1 <- choices_selected(variable_choices(ADSL, c("ARM", "COUNTRY", "SEX")), selected = NULL)
#'
app <- init(
data = cdisc_data(
cdisc_dataset("ADSL", ADSL),
code = "ADSL <- synthetic_cdisc_data(\"latest\")$adsl",
check = FALSE
),
modules = root_modules(
tm_g_distribution(
dist_var = data_extract_spec(
dataname = "ADSL",
select = select_spec(
choices = variable_choices(ADSL, c("AGE", "BMRKR1")),
selected = "BMRKR1",
multiple = FALSE,
fixed = FALSE
)
),
strata_var = data_extract_spec(
dataname = "ADSL",
filter = filter_spec(
vars = vars1,
multiple = TRUE
)
),
group_var = data_extract_spec(
dataname = "ADSL",
filter = filter_spec(
vars = vars1,
multiple = TRUE
)
)
)
)
)
shinyApp(app$ui, app$server)

```
Screen Shot 2022-01-21 at 15 05 28

Contributor guide

Open the contributing guide

Research direction

Start by running the supplied reproducible Shiny app with tm_g_distribution and compare the distribution parameters with and without group_by applied. Inspect the tm_g_distribution grouping and plot behavior to determine why the theoretical curve disappears or ignores parameter changes. Done means changing distribution parameters produces the expected visible effect when group_by is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.