Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
FBartos committed Oct 28, 2024
1 parent c177450 commit 5793f9f
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
19 changes: 18 additions & 1 deletion inst/qml/NonParametricSurvivalAnalysis.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ import JASP 1.0
import "./qml_components" as SA

Form
{
{
info: qsTr("This analysis computes a survival curve for censored data using the Kaplan-Meier estimator for single-event survival data. It estimates the probability of survival over time, allowing you to understand and visualize the distribution of survival times within your data. The analysis accommodates censored observations (subjects for whom the event has not occurred during the study period) and enables comparison of survival curves across different groups using statistical tests such as the Log-Rank test, Peto and Peto test, and Fleming-Harrington test. Additionally, you can generate life tables to summarize survival data at specified intervals.")

VariablesForm
{
AvailableVariablesList
Expand All @@ -38,6 +40,7 @@ Form
title: qsTr("Time to Event")
allowedColumns: ["scale"]
singleVariable: true
info: qsTr("Select the variable that represents the time until the event or censoring occurs.")
}

AssignedVariablesList
Expand All @@ -47,6 +50,7 @@ Form
title: qsTr("Event Status")
allowedColumns: ["nominal"]
singleVariable: true
info: qsTr("Choose the variable that indicates the event status, specifying whether each observation is an event or censored.")
}

DropDown
Expand All @@ -55,6 +59,7 @@ Form
label: qsTr("Event Indicator")
source: [{name: "eventStatus", use: "levels"}]
onCountChanged: currentIndex = 1
info: qsTr("Specify the value in the Event Status variable that indicates the occurrence of the event.")
}

AssignedVariablesList
Expand All @@ -63,6 +68,7 @@ Form
id: strata
title: qsTr("Strata")
allowedColumns: ["nominal"]
info: qsTr("Select variables to define strata, allowing separate survival curves for each stratum.")
}
}

Expand All @@ -77,18 +83,21 @@ Form
{
name: "testsLogRank"
label: qsTr("Log-rank (Mantel-Haenszel)")
info: qsTr("Include the Log-Rank (Mantel-Haenszel) test to compare survival curves across strata.")
}

CheckBox
{
name: "testsPetoAndPeto"
label: qsTr("Peto and Peto")
info: qsTr("Include the Peto and Peto modification of the Gehan-Wilcoxon test to compare survival curves across strata.")
}

CheckBox
{
name: "testsFlemmingHarrington"
label: qsTr("Flemming-Harrington")
info: qsTr("Include the Fleming-Harrington test to compare survival curves across strata., with a customizable rho parameter.")

DoubleField
{
Expand All @@ -97,6 +106,7 @@ Form
defaultValue: 0.5
min: 0
max: 1
info: qsTr("Set the rho parameter for the Fleming-Harrington test, controlling the weight given to different time points (values between 0 and 1).")
}
}
}
Expand All @@ -105,12 +115,14 @@ Form
{
name: "lifeTable"
label: qsTr("Life table")
info: qsTr("Generate a life table summarizing survival data at specified time intervals.")

DropDown
{
name: "lifeTableStepsType"
id: lifeTableStepsType
label: qsTr("Steps type")
info: qsTr("Select the method to define intervals for the life table: Default, Quantiles, or Fixed size.")
values:
[
{ label: qsTr("Default"), value: "default"},
Expand All @@ -125,6 +137,7 @@ Form
label: qsTr("Number")
defaultValue: 10
visible: lifeTableStepsType.value == "quantiles"
info: qsTr("Specify the number of intervals when using Quantiles as the steps type.")
}

CheckBox
Expand All @@ -133,6 +146,7 @@ Form
label: qsTr("Round steps")
checked: true
visible: lifeTableStepsType.value == "quantiles"
info: qsTr("Round the interval boundaries to the nearest integer when using Quantiles steps.")
}

DoubleField
Expand All @@ -143,6 +157,7 @@ Form
defaultValue: 0
max: lifeTableStepsTo.value
visible: lifeTableStepsType.value == "fixedSize"
info: qsTr("Set the starting time for intervals when using Fixed size steps.")
}

DoubleField
Expand All @@ -152,6 +167,7 @@ Form
defaultValue: 1
// max: lifeTableStepsTo.value // TODO: enable once max is data dependent
visible: lifeTableStepsType.value == "fixedSize"
info: qsTr("Define the size of each interval when using Fixed size steps.")
}

DoubleField
Expand All @@ -162,6 +178,7 @@ Form
defaultValue: 0
min: lifeTableStepsFrom.value
visible: lifeTableStepsType.value == "fixedSize"
info: qsTr("Set the ending time for intervals when using Fixed size steps.")
}
}
}
Expand Down
Loading

0 comments on commit 5793f9f

Please sign in to comment.