Skip to content

Commit

Permalink
add subgroup analysis to propensity score
Browse files Browse the repository at this point in the history
  • Loading branch information
MyungHyojong committed Dec 26, 2024
1 parent 007586b commit d10a722
Showing 1 changed file with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions R/jsPropensityGadget.R
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,88 @@ jsPropensityExtAddin <- function(nfactor.limit = 20, max.filesize = 2048) {
)
)
)
),
navbarMenu(
title = "Subgroup analysis",
icon = icon("chart-bar"),
tabPanel(
title = "subgroup cox",
sidebarLayout(
sidebarPanel(
forestcoxUI("Forest")
),
mainPanel(
tabsetPanel(
type = "pills",
tabPanel(
title = "Data",
withLoader(
DTOutput("tablesub"),
type = "html",
loader = "loader6"
)
),
tabPanel(
title = "figure",
plotOutput("forestplot", width = "100%"),
ggplotdownUI("Forest")
)
)
)
)
),
tabPanel(
title = "subgroup regression",
sidebarLayout(
sidebarPanel(
forestglmUI("Forest_glm")
),
mainPanel(
tabsetPanel(
type = "pills",
tabPanel(
title = "Data",
withLoader(
DTOutput("tablesub_glm"),
type = "html",
loader = "loader6"
)
),
tabPanel(
title = "figure",
plotOutput("forestplot_glm", width = "100%"),
ggplotdownUI("Forest_glm")
)
)
)
)
),
tabPanel(
title = "subgroup logistic regression",
sidebarLayout(
sidebarPanel(
forestglmUI("Forest_glmbi")
),
mainPanel(
tabsetPanel(
type = "pills",
tabPanel(
title = "Data",
withLoader(
DTOutput("tablesub_glmbi"),
type = "html",
loader = "loader6"
)
),
tabPanel(
title = "figure",
plotOutput("forestplot_glmbi", width = "100%"),
ggplotdownUI("Forest_glmbi")
)
)
)
)
)
)
)

Expand Down Expand Up @@ -2365,6 +2447,30 @@ jsPropensityExtAddin <- function(nfactor.limit = 20, max.filesize = 2048) {
)
})

outtable <- forestcoxServer("Forest", data = data, data_label = data.label)

output$tablesub <- renderDT({
outtable()[[1]]
})
output$forestplot <- renderPlot({
outtable()[[2]]
})
outtable_glm <- forestglmServer("Forest_glm", data = data, data_label = data.label, family = "gaussian")
output$tablesub_glm <- renderDT({
outtable_glm()[[1]]
})
output$forestplot_glm <- renderPlot({
outtable_glm()[[2]]
})
outtable_glmbi <- forestglmServer("Forest_glmbi", data = data, data_label = data.label, family = "binomial")
output$tablesub_glmbi <- renderDT({
outtable_glmbi()[[1]]
})
output$forestplot_glmbi <- renderPlot({
outtable_glmbi()[[2]]
})


session$onSessionEnded(function() {
stopApp()
})
Expand Down

0 comments on commit d10a722

Please sign in to comment.