-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathfunction-reference.Rmd
More file actions
289 lines (215 loc) · 11.3 KB
/
function-reference.Rmd
File metadata and controls
289 lines (215 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
---
title: "Function Reference Guide"
author: "ClinicoPath Team"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
toc: true
toc_depth: 4
vignette: >
%\VignetteIndexEntry{Function Reference Guide}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# ClinicoPathJamoviModule Function Reference
**Total Functions:** 420+
**Menu Groups:** 5 (ClinicoPathDescriptives, JJStatsPlot, OncoPath, jsurvival, meddecide)
**Status Categories:** Stable, To be Tested, Drafts
**GitHub:** [ClinicoPathJamoviModule](https://github.com/sbalci/ClinicoPathJamoviModule)
**Documentation:** [www.serdarbalci.com/ClinicoPathJamoviModule](https://www.serdarbalci.com/ClinicoPathJamoviModule/)
---
## How to Use This Reference
This guide catalogs all 420+ analysis functions in ClinicoPathJamoviModule organized by:
- **Menu Group:** Where to find the function in jamovi's menu
- **Status:** Stability and testing status
- **Purpose:** What the function does
- **When to Use:** Clinical and research scenarios
- **Test Data:** Available example datasets
### Function Status Levels
- **Stable:** Production-ready, thoroughly tested
- **To be Tested:** Functional but needs more validation
- **Drafts:** Work in progress, may have limitations
### Quick Navigation
- [ClinicoPathDescriptives](#clinicopathdescriptives) - Descriptive statistics, data quality
- [JJStatsPlot](#jjstatsplot) - Statistical visualizations
- [OncoPath](#oncopath) - Pathology and oncology analyses
- [jsurvival](#jsurvival) - Survival analysis tools
- [meddecide](#meddecide) - Diagnostic test evaluation, decision analysis
---
## ClinicoPathDescriptives
Comprehensive descriptive statistics and data quality tools for clinical research.
### Stable Functions
#### agepyramid
**Internal:** `agepyramid`
**Purpose:** Population pyramid visualization
**When to use:** Demographic analysis, cohort characterization, age-gender distribution
**Test Data:** [1 .omv file](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/agepyramid_test.omv)
#### tableone
**Internal:** `tableone`
**Purpose:** Generate publication-ready "Table 1" with baseline characteristics
**When to use:** Manuscript preparation, clinical trial baseline tables, cohort comparison
**Test Data:** [1 .omv file](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/tableone_test.omv)
#### crosstable
**Internal:** `crosstable`
**Purpose:** Advanced contingency tables with percentages and statistics
**When to use:** Categorical variable comparisons, disease vs. exposure, treatment outcomes
**Test Data:** [1 .omv file](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/crosstable_test.omv)
#### summarydata
**Internal:** `summarydata`
**Purpose:** Comprehensive summary statistics for continuous and categorical variables
**When to use:** Exploratory data analysis, descriptive statistics, data overview
**Test Data:** [1 .omv file](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/summarydata_test.omv)
---
## meddecide
Medical decision analysis, diagnostic test evaluation, and agreement studies.
### ✨ NEW: Kappa Sample Size Functions (January 2025)
Three complementary functions for comprehensive kappa agreement study planning:
#### kappasizeci ✨
**Internal:** `kappaSizeCI`
**Purpose:** Sample size for kappa estimation (precision approach)
**When to use:** Planning agreement studies, method validation, estimating true agreement
**Approach:** "How many subjects to estimate kappa within ±X?"
**Test Data:**
- [Comprehensive scenarios](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/kappasizeci_scenarios_comprehensive.omv) (86 scenarios)
- [Relationship cases](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/kappasizeci_relationship_cases.omv)
- [Validation cases](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/kappasizeci_validation_cases.omv)
**Key Features:**
- Confidence interval-based precision
- 2-5 outcome categories
- 2-5 raters
- Binary, ordinal, continuous outcomes
#### kappasizefixedn ✨
**Internal:** `kappaSizeFixedN`
**Purpose:** Reverse calculation - detectable kappa for fixed sample size
**When to use:** Resource-constrained studies, completed trials, QA programs, feasibility
**Approach:** "What can I detect with my fixed n?"
**Test Data:**
- [Comprehensive scenarios](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/kappasizefixedn_scenarios_comprehensive.omv) (86 scenarios)
- [Power cases](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/kappasizefixedn_power_cases.omv)
- [Validation cases](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/kappasizefixedn_validation_cases.omv)
**Constraint Types:**
- Budget constraints
- Time constraints
- Case availability (rare diseases)
- Regulatory requirements
- Completed studies (retrospective)
- QA protocols (fixed annual samples)
#### kappasizepower ✨
**Internal:** `kappaSizePower`
**Purpose:** Sample size for kappa hypothesis testing (power approach)
**When to use:** Planning studies to test agreement hypotheses, comparing to threshold
**Approach:** "How many to test κ₁ vs. κ₀ with power X?"
**Test Data:**
- [Comprehensive scenarios](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/kappasizepower_scenarios_comprehensive.omv) (86 scenarios)
- [Relationship cases](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/kappasizepower_relationship_cases.omv)
- [Validation cases](https://raw.githubusercontent.com/sbalci/ClinicoPathJamoviModule/master/data/kappasizepower_validation_cases.omv)
**Total Kappa Coverage:** 258 scenarios (86 per function) covering sample sizes n=10 to n=2000
---
### Stable Functions
#### agreement
**Internal:** `agreement`
**Purpose:** Interrater reliability and agreement analysis
**When to use:** Diagnostic concordance, QA studies, method comparison
**Methods:** Kappa, ICC, Bland-Altman plots
**Test Data:** [12 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data) (binary, ordinal, continuous, multi-rater)
#### decision
**Internal:** `decision`
**Purpose:** Diagnostic test performance analysis
**When to use:** Evaluating tests, biomarkers, screening tools, clinical decision rules
**Metrics:** Sensitivity, specificity, PPV, NPV, likelihood ratios
**Test Data:** [16 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data)
#### enhancedROC
**Internal:** `enhancedROC`
**Purpose:** Advanced ROC analysis with optimal cutpoint selection
**When to use:** Biomarker cutpoint optimization, ROC comparison, AUC analysis
**Test Data:** [8 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data)
---
## jsurvival
Comprehensive survival analysis tools for clinical research.
### Stable Functions
#### outcomeorganizer
**Internal:** `outcomeorganizer`
**Purpose:** Calculate survival endpoints from raw event dates
**When to use:** Preparing survival data from databases, calculating OS/PFS/DFS/RFS
**Test Data:** [20 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data) - **Most comprehensive**
#### timeinterval
**Internal:** `timeinterval`
**Purpose:** Calculate time intervals between dates in various formats
**When to use:** Treatment duration, follow-up time, date arithmetic
**Test Data:** [24 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data) - **MOST comprehensive function**
#### survival
**Internal:** `survival`
**Purpose:** Comprehensive survival analysis with Cox regression
**When to use:** Full survival analysis, multivariable models, hazard ratios
**Test Data:** [9 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data)
---
## OncoPath
Specialized tools for pathology and oncology research.
### Stable Functions
#### waterfall
**Internal:** `waterfall`
**Purpose:** Treatment response waterfall plots (RECIST)
**When to use:** Oncology trials, tumor burden change, identifying responders
**Test Data:** [16 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data)
#### swimmerplot
**Internal:** `swimmerplot`
**Purpose:** Individual patient timeline visualization
**When to use:** Clinical trial timelines, treatment sequences, patient journeys
**Test Data:** [16 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data)
#### ihcheterogeneity
**Internal:** `ihcheterogeneity`
**Purpose:** IHC scoring heterogeneity and spatial variation analysis
**When to use:** IHC quality control, intratumoral heterogeneity, multi-block sampling
**Test Data:** [21 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data) - **2nd most comprehensive**
---
## JJStatsPlot
Statistical visualization tools with automated statistics.
### Stable Functions
#### jjcorrmat
**Internal:** `jjcorrmat`
**Purpose:** Correlation matrices with significance and clustering
**When to use:** Multiple biomarker relationships, laboratory panels, multivariate exploration
**Test Data:** [6 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data)
#### linechart
**Internal:** `linechart`
**Purpose:** Line charts for longitudinal data
**When to use:** Time series, biomarker trajectories, treatment response over time
**Test Data:** [13 .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data)
---
## Quick Reference Tables
### Most Comprehensive Test Coverage
Functions with 15+ test data files:
| Function | Files | Category | Key Use |
|----------|-------|----------|---------|
| timeinterval | 24 | jsurvival | Date calculations |
| ihcheterogeneity | 21 | OncoPath | IHC heterogeneity |
| outcomeorganizer | 20 | jsurvival | Survival endpoints |
| singlearm | 18 | jsurvival | Phase II trials |
| nogoldstandard | 18 | meddecide | Tests without gold standard |
| psychopdaROC | 17 | meddecide | Cost-benefit ROC |
| survivalcont | 17 | jsurvival | Cutpoint optimization |
### Functions by Clinical Domain
**Survival Analysis:** timeinterval (24), outcomeorganizer (20), singlearm (18), survivalcont (17)
**Diagnostic Testing:** nogoldstandard (18), psychopdaROC (17), decision (16), decisioncompare (14), kappasizeci (3)✨, kappasizefixedn (3)✨, kappasizepower (3)✨
**Pathology:** ihcheterogeneity (21), waterfall (16), swimmerplot (16), stagemigration (13)
**Statistical Plots:** hullplot (13), linechart (13), jjdotplotstats (8), jjhistostats (8)
---
## Getting Help
- **Documentation:** [www.serdarbalci.com/ClinicoPathJamoviModule](https://www.serdarbalci.com/ClinicoPathJamoviModule/)
- **GitHub Issues:** [Report bugs or request features](https://github.com/sbalci/ClinicoPathJamoviModule/issues)
- **Test Data:** [Browse all .omv files](https://github.com/sbalci/ClinicoPathJamoviModule/tree/master/data)
- **Complete Catalog:** See `vignette("test-data-catalog")` for all 945 test datasets
---
## How to Cite
```
Balci S (2025). ClinicoPathJamoviModule: Clinicopathological Data Analysis.
R package version 0.0.31. https://github.com/sbalci/ClinicoPathJamoviModule
```
---
**Note:** This reference shows key functions. For the complete list of all 420+ functions, visit the [full documentation](https://www.serdarbalci.com/ClinicoPathJamoviModule/).