Add spending time to `sim_gs_n`
@LittleBeannie ya está trabajando en esto.
Desde el 24/7/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
For group sequential designs, spending functions can be defined based on different fractions:
- information fraction (default)
- event fraction
- calendar time fraction
- minimal of planned and actual information fraction
The above 4 options is for interim analysis (IA). For final analysis (FA), there are 2 options:
- actual information fraction
- full alpha
To enable the above 8 options for a group sequential design, there are 2 proposed API.
API proposal 1:
sim_gs_n(
spending_time = c("info_frac", "event_frac", "time_frac", "min_planned_actual_info_frac"),
full_alpha_for_FA = TRUE,
....)
API proposal 2:
When specifying the spending time in sim_gs_n(), we may temporarily propose introducing a create_spending() function, similar to how we implemented create_cut(). For example:
create_spending_time <- function(actual_info = FALSE,
planned_info = FALSE,
actual_event = FALSE,
actual_time = FALSE){...}
Since the information fraction, event fraction, and calendar time fraction can vary between simulations, the spending function should be flexible to accommodate any combination of these inputs. The idea is to specify which of info, event, and time are used to define the spending.
Below is a draft illustrating this concept (please note the syntax and grammar are for illustration and may need refinement):
# spending by information fraction only (default)
# this is the same as API 1 when spending_time = "info_frac"
sim_gs_n(spending_time = create_spending_time(actual_info = TRUE),
full_alpha_for_FA = TRUE,
...)
# spending by event fraction only
# this is the same as API 1 when spending_time = "event_frac"
sim_gs_n(spending = create_spending_time(actual_event = TRUE)
full_alpha_for_FA = TRUE,
...)
# spending by calendar time fraction only
# this is the same as API 1 when spending_time = "time_frac"
sim_gs_n(spending = create_spending_time(actual_time = TRUE)
full_alpha_for_FA = TRUE,
...)
# spending by min{event fraction, calendar time fraction}
# this is the same as API 1 when spending_time = "min_planned_actual_info_frac"
sim_gs_n(spending = create_spending_time(actual_info = TRUE, planned_info = TRUE)
full_alpha_for_FA = TRUE,
...)
Comments and thoughts are welcome!!!
- Lenguaje dominante
- R
- Estrellas
- 41
- Forks
- 14
- Merge medio
- 3 h 4 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Merck/simtrial
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Missing updated bounds from `sim_gs_n()` changed from `Inf` to `NA` with latest {gsDesign2}Quizá libre de nuevo @jdblischak la tomó hace 31 días y no hay ningún pull request abierto. Abierto
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Todos los issues de Merck/simtrial
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
OHDSI/PatientLevelPrediction#688 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rfordatascience/tidytuesday#1098 ·