diff --git a/R/multisurvival.h.R b/R/multisurvival.h.R index 29f57d89..68013945 100644 --- a/R/multisurvival.h.R +++ b/R/multisurvival.h.R @@ -25,14 +25,7 @@ multisurvivalOptions <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Cla uselandmark = FALSE, landmark = 3, hr = FALSE, - sty = "t1", - km = FALSE, - endplot = 60, - byplot = 12, - ci95 = FALSE, - risktable = FALSE, - censored = FALSE, - pplot = TRUE, ...) { + sty = "t1", ...) { super$initialize( package="ClinicoPath", @@ -157,34 +150,6 @@ multisurvivalOptions <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Cla "t1", "t3"), default="t1") - private$..km <- jmvcore::OptionBool$new( - "km", - km, - default=FALSE) - private$..endplot <- jmvcore::OptionInteger$new( - "endplot", - endplot, - default=60) - private$..byplot <- jmvcore::OptionInteger$new( - "byplot", - byplot, - default=12) - private$..ci95 <- jmvcore::OptionBool$new( - "ci95", - ci95, - default=FALSE) - private$..risktable <- jmvcore::OptionBool$new( - "risktable", - risktable, - default=FALSE) - private$..censored <- jmvcore::OptionBool$new( - "censored", - censored, - default=FALSE) - private$..pplot <- jmvcore::OptionBool$new( - "pplot", - pplot, - default=TRUE) self$.addOption(private$..elapsedtime) self$.addOption(private$..tint) @@ -206,13 +171,6 @@ multisurvivalOptions <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Cla self$.addOption(private$..landmark) self$.addOption(private$..hr) self$.addOption(private$..sty) - self$.addOption(private$..km) - self$.addOption(private$..endplot) - self$.addOption(private$..byplot) - self$.addOption(private$..ci95) - self$.addOption(private$..risktable) - self$.addOption(private$..censored) - self$.addOption(private$..pplot) }), active = list( elapsedtime = function() private$..elapsedtime$value, @@ -234,14 +192,7 @@ multisurvivalOptions <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Cla uselandmark = function() private$..uselandmark$value, landmark = function() private$..landmark$value, hr = function() private$..hr$value, - sty = function() private$..sty$value, - km = function() private$..km$value, - endplot = function() private$..endplot$value, - byplot = function() private$..byplot$value, - ci95 = function() private$..ci95$value, - risktable = function() private$..risktable$value, - censored = function() private$..censored$value, - pplot = function() private$..pplot$value), + sty = function() private$..sty$value), private = list( ..elapsedtime = NA, ..tint = NA, @@ -262,14 +213,7 @@ multisurvivalOptions <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Cla ..uselandmark = NA, ..landmark = NA, ..hr = NA, - ..sty = NA, - ..km = NA, - ..endplot = NA, - ..byplot = NA, - ..ci95 = NA, - ..risktable = NA, - ..censored = NA, - ..pplot = NA) + ..sty = NA) ) multisurvivalResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class( @@ -498,13 +442,6 @@ multisurvivalBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class( #' @param landmark . #' @param hr . #' @param sty . -#' @param km . -#' @param endplot . -#' @param byplot . -#' @param ci95 . -#' @param risktable . -#' @param censored . -#' @param pplot . #' @return A results object containing: #' \tabular{llllll}{ #' \code{results$todo} \tab \tab \tab \tab \tab a html \cr @@ -539,14 +476,7 @@ multisurvival <- function( uselandmark = FALSE, landmark = 3, hr = FALSE, - sty = "t1", - km = FALSE, - endplot = 60, - byplot = 12, - ci95 = FALSE, - risktable = FALSE, - censored = FALSE, - pplot = TRUE) { + sty = "t1") { if ( ! requireNamespace("jmvcore", quietly=TRUE)) stop("multisurvival requires jmvcore to be installed (restart may be required)") @@ -589,14 +519,7 @@ multisurvival <- function( uselandmark = uselandmark, landmark = landmark, hr = hr, - sty = sty, - km = km, - endplot = endplot, - byplot = byplot, - ci95 = ci95, - risktable = risktable, - censored = censored, - pplot = pplot) + sty = sty) analysis <- multisurvivalClass$new( options = options, diff --git a/jamovi/multisurvival.a.yaml b/jamovi/multisurvival.a.yaml index c0d2e7f4..bf868ad0 100644 --- a/jamovi/multisurvival.a.yaml +++ b/jamovi/multisurvival.a.yaml @@ -89,9 +89,6 @@ options: permitted: [ numeric ] - - - - name: multievent title: Multiple Event Levels type: Bool @@ -161,16 +158,11 @@ options: type: Integer default: 3 - - - - - name: hr title: Hazards Regression Plot type: Bool default: false - - name: sty title: Plot Style type: List @@ -183,10 +175,11 @@ options: name: t3 default: t1 - - name: km - title: Kaplan-Meier - type: Bool - default: false + + # - name: km + # title: Kaplan-Meier + # type: Bool + # default: false # - name: ac @@ -202,36 +195,36 @@ options: # permitted: [ factor ] - - name: endplot - title: Plot End Time - type: Integer - default: 60 + # - name: endplot + # title: Plot End Time + # type: Integer + # default: 60 - - name: byplot - title: Time Interval - type: Integer - default: 12 + # - name: byplot + # title: Time Interval + # type: Integer + # default: 12 - - name: ci95 - title: '95% CI' - type: Bool - default: false + # - name: ci95 + # title: '95% CI' + # type: Bool + # default: false - - name: risktable - title: risktable - type: Bool - default: false + # - name: risktable + # title: risktable + # type: Bool + # default: false - - name: censored - title: censored - type: Bool - default: false + # - name: censored + # title: censored + # type: Bool + # default: false - - name: pplot - title: p-value - type: Bool - default: true + # - name: pplot + # title: p-value + # type: Bool + # default: true # - name: calculatedtime # title: Add Calculated Time to Data diff --git a/jamovi/multisurvival.u.yaml b/jamovi/multisurvival.u.yaml index 0a8dd03b..657114ec 100644 --- a/jamovi/multisurvival.u.yaml +++ b/jamovi/multisurvival.u.yaml @@ -22,8 +22,10 @@ children: name: outcome maxItemCount: 1 isTarget: true + fitToGrid: true - type: LevelSelector name: outcomeLevel + enable: (outcome && !multievent) - type: TargetLayoutBox label: Explanatory Variables children: @@ -57,6 +59,7 @@ children: name: dxdate maxItemCount: 1 isTarget: true + enable: (tint) - type: TargetLayoutBox label: Follow-up Date children: @@ -64,31 +67,30 @@ children: name: fudate maxItemCount: 1 isTarget: true - + enable: (tint) - type: LayoutBox margin: large children: - type: ComboBox name: timetypedata + enable: (tint) - type: LayoutBox margin: large children: - type: ComboBox name: timetypeoutput + enable: (tint) - type: LayoutBox margin: large children: - type: CheckBox name: uselandmark - - type: LayoutBox - margin: large - children: - - type: TextBox - name: landmark - format: number - - - + enable: (tint) + children: + - type: TextBox + name: landmark + format: number + enable: (uselandmark) - type: CollapseBox label: Analysis with Multiple Outcomes collapsed: false @@ -99,84 +101,65 @@ children: children: - type: CheckBox name: multievent - - type: LayoutBox - margin: large - children: - - type: LevelSelector - name: dod - - type: LayoutBox - margin: large - children: - - type: LevelSelector - name: dooc - - type: LayoutBox - margin: large - children: - - type: LevelSelector - name: awd - - type: LayoutBox - margin: large - children: - - type: LevelSelector - name: awod - - type: LayoutBox - margin: large - children: - - type: ComboBox - name: analysistype - - - type: LayoutBox - margin: large - children: - - type: CheckBox - name: hr - - type: LayoutBox - margin: large - children: - - type: ComboBox - name: sty - - type: LayoutBox - margin: large - children: - - type: CheckBox - name: km - - type: LayoutBox - margin: large - children: - - type: TextBox - name: endplot - format: number - - type: LayoutBox - margin: large - children: - - type: TextBox - name: byplot - format: number - - type: LayoutBox - margin: large + - type: LayoutBox + margin: large + children: + - type: LevelSelector + name: dod + enable: (outcome && multievent) + - type: LevelSelector + name: dooc + enable: (outcome && multievent) + - type: LevelSelector + name: awd + enable: (outcome && multievent) + - type: LevelSelector + name: awod + enable: (outcome && multievent) + - type: LayoutBox + margin: large + children: + - type: ComboBox + name: analysistype + - type: CollapseBox + label: Plots + collapsed: false + stretchFactor: 1 children: - - type: CheckBox - name: ci95 - - type: CheckBox - name: risktable - - type: CheckBox - name: censored - - type: CheckBox - name: pplot - - type: Label + - type: Label + label: Hazard Regression Plots + fitToGrid: true + children: + - type: LayoutBox + fitToGrid: true + children: + - type: CheckBox + name: hr + - type: LayoutBox + margin: large + children: + - type: ComboBox + name: sty + enable: (hr) + - type: CollapseBox label: Adjusted Survival Curve (Being Updated) - fitToGrid: true + collapsed: true stretchFactor: 1 - children: [] + children: + - type: Label + label: Adjusted Survival Curve (Being Updated) + fitToGrid: true + stretchFactor: 1 + children: [] - type: CollapseBox - label: Save Converted Variables to Data + label: Save Converted Variables to Data (Being Updated) collapsed: true children: - type: Label - label: Add Calculated Time to Your Data + label: Add Calculated Time to Your Data (Being Updated) fitToGrid: true children: [] - type: Label - label: Add Redefined Outcome to Data + label: Add Redefined Outcome to Data (Being Updated) fitToGrid: true children: []