Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
a4fd984
Add Phase 0 WebR package validation infrastructure
claude Feb 7, 2026
12e974f
Fix WebR package installation and benchmark scoping bugs
claude Feb 7, 2026
e083ec0
Fix download: replace downloadHandler with JS blob download
claude Feb 7, 2026
e6dc70b
Phase 0 gate PASS: 15/15 packages confirmed in WebR browser Run 2
claude Feb 8, 2026
4cd4926
Phase 1: Complete 6-step statistical analysis wizard
claude Feb 8, 2026
24b5cd3
Fix 6 browser-test bugs + add loading screen with progress
claude Feb 9, 2026
e6a7c42
Add statistical validation suite (70/70 pass) + fix Cox model factor bug
claude Feb 9, 2026
8511084
Remove Step 5 (causal/DAG), fix report Table 1, export as PDF
claude Feb 10, 2026
2ce0051
Describe the change
Feb 10, 2026
28612b1
Merge branch 'claude/phase-1-webr-validation-rKxWg' of https://github…
Feb 10, 2026
0140d8f
Add Methods & Results drafting tab (per spec)
claude Feb 10, 2026
8e75c0f
Fix Table 1 in LLM prompt + request journal-ready Table 1 & Table 2
claude Feb 10, 2026
9c18f42
Add Plots tab to Step 4 with model-appropriate visualizations
claude Feb 13, 2026
4ece735
Include Diagnostics forest plot in Step 5 and PDF export
claude Feb 13, 2026
33b8cde
Fix: Show faceted plot once when multiple variables selected
claude Feb 13, 2026
0a0b7e4
Add statistic label column to Table 1
claude Feb 13, 2026
671478c
Table 1: test normality to choose Mean (SD) vs Median (IQR)
claude Feb 13, 2026
7fe7451
Table 1: default Mean (SD), optional normality test for Median (IQR)
claude Feb 13, 2026
3ea37fd
Table 1: show all estimates to 2 decimal places
claude Feb 13, 2026
d9aeeb4
Align p-value tests with normality decisions in Table 1
claude Feb 14, 2026
bc80ed5
Add missing data handling info, KM survival curve, and descriptive ta…
Feb 16, 2026
e336a5f
Remove event variable box, rename outcome label, fix Cox diagnostics
Feb 16, 2026
3fafd65
Fix Cox diagnostics: concordance NaN and "+<-" scoping error
Feb 16, 2026
4e9108e
Fix "+<-" error: move assignment out of ggplot chain
Feb 16, 2026
3ec8dc9
Fix mixed model tidy error: use broom.mixed for lmer objects
Feb 16, 2026
fe83ca5
Fix mixed model results: manually extract lmer coefficients
Feb 16, 2026
71e02a5
Add ICC display, binary mixed models, and auto-detect outcome type
Feb 16, 2026
4ecf956
Add AIC/BIC to Step 4, match titles in PDF report, remove Methods & R…
Feb 16, 2026
8feabd7
Add methods summary to report, text/Word download, remove preview
Feb 16, 2026
49aa59d
Fix parse error: move Word XML namespace header to R side
Feb 16, 2026
0d3bfa0
Fix PDF download: use hidden iframe instead of new window
Feb 16, 2026
d1c58f6
Use html2pdf.js for direct PDF file download
Feb 16, 2026
ddd8d68
Fix empty PDF: render HTML in iframe before converting to PDF
Feb 16, 2026
7e491c9
Improve PDF text clarity: higher DPI, PNG format, larger font
Feb 16, 2026
c7ae9bc
Overwrite with local versions of modified files
Feb 17, 2026
0434c8e
Fix index.html to load Shinylive from local files instead of shinyliv…
Feb 17, 2026
5821966
Add vercel.json to set output directory and production branch
Feb 17, 2026
ee04520
Fix index.html: use local shinylive files with service worker pre-reg…
Feb 17, 2026
6c649b7
Update app.json with Phase 1 statistical analysis app
Feb 18, 2026
7779a76
Fix WebR compatibility: replace gtsummary/gt with base R HTML tables
Feb 18, 2026
91e9ef3
Remove vercel.json - deploying via GitHub Pages only
claude Feb 19, 2026
1d507d9
Fix 5 bugs: distribution, Table 1, estimates, plots, table styling
claude Feb 19, 2026
f5f33c4
Fix 3 runtime bugs: ggplot2 loading, Table 1 estimates, plots
claude Feb 19, 2026
b1da75a
Regenerate docs with latest fixes
Feb 19, 2026
8388af4
Fix Step 5 table reuse, ggplot2 loading, and shared state
claude Feb 20, 2026
6cb69f2
Regenerate docs with latest fixes
Feb 20, 2026
f8f1376
Fix ggplot2 loading, reorder regression columns, auto-generate plots
claude Feb 20, 2026
1b0e790
Update Shinylive export
Feb 20, 2026
8076009
Fix ggplot2: add library(ggplot2) at top for Shinylive bundling
claude Feb 20, 2026
3828e49
Update Shinylive export - ggplot2 bundled
Feb 20, 2026
9b3729e
Use base R graphics for Step 2, fix ggplot2 loading in WebR
claude Feb 20, 2026
cf0c767
Update Shinylive export - ggplot2 bundled
Feb 20, 2026
888dd73
Add munsell to package list, fix Estimate column position
claude Feb 20, 2026
cdb89cf
Move P-value column immediately after CI Upper
claude Feb 20, 2026
a62723b
Update Shinylive export - ggplot2 bundled
Feb 20, 2026
ee44b56
Fix exports: use exact app tables in Word/PDF/TXT reports
claude Feb 20, 2026
3801bbf
Update Shinylive export
Feb 20, 2026
959d24a
Fix logistic/cox CIs, auto-show KM plots, improve Step 5 plot export
claude Feb 20, 2026
abef4e9
Update Shinylive export
Feb 20, 2026
a469d52
Fix overlapping plots: stack vertically with dynamic height
claude Feb 20, 2026
9b3299d
Update Shinylive export
Feb 20, 2026
12aab1b
Fix plot base64 for Step 5, clipboard copy, and reports
claude Feb 20, 2026
5ea8a73
Update Shinylive export - ggplot2 bundled
Feb 20, 2026
1051e2a
Fix Step 4 renderPlot for gridExtra multi-plot output
claude Feb 20, 2026
d1ba666
Update Shinylive export
Feb 20, 2026
8a53a9b
Add pre-WebR loading indicator and post-export script
claude Feb 21, 2026
2f9f629
Lazy-load packages: 3 essential at startup, 12 deferred in background
claude Feb 21, 2026
524f53f
Replace post-export.sh with post-export.py (cross-platform)
claude Feb 23, 2026
83b3562
Add post-export.R for Windows users without Python on PATH
claude Feb 23, 2026
aa83d6a
Update export
Feb 23, 2026
0c3f0a0
Update Shinylive export with preloader
Feb 23, 2026
a365563
Update Shinylive export
Feb 23, 2026
1cfdf00
Fix lazy-loading: use later() to break synchronous observer chain
claude Feb 23, 2026
8e2290d
Update export
Feb 23, 2026
d0b4157
Zero packages at startup — app shows immediately
claude Feb 23, 2026
5c4bac7
Update export
Feb 23, 2026
db7ad2c
Optimize load time: preload hints + strip 110 unused packages (97MB)
claude Feb 23, 2026
202f831
Update export with optimizations
Feb 23, 2026
2216cfa
Move test files out of shinylive-app/ to reduce app.json by 90%
claude Feb 23, 2026
364a9c4
Update export
Feb 23, 2026
c7f20ef
Add real progress bar + optimize preload strategy
claude Feb 23, 2026
5077cf1
Update export
Feb 23, 2026
a035236
Fix progress bar: use time-based estimation instead of Performance API
claude Feb 23, 2026
e19eed2
Update export
Feb 23, 2026
4f0a532
Fix preloader: poll for actual Shiny app, not Shinylive container
claude Feb 23, 2026
e2cd699
Update export
Feb 23, 2026
b584ea7
Fix preloader: max z-index, always overwrite, paint after #root
claude Feb 23, 2026
1d5b0a3
Suppress Shinylive hex spinner so custom preloader stays visible
claude Feb 23, 2026
3b83a8c
Update export
Feb 23, 2026
3c7b65d
Fix preloader: use visibility:hidden instead of display:none, detect …
claude Feb 23, 2026
ffe643e
Update export
Feb 23, 2026
be9dc88
Slow progress bar to match ~40s actual load time
claude Feb 23, 2026
eeb36a6
Fix Table 1 N counts in column headers and add missing package deps
claude Feb 23, 2026
0358b10
Update export
Feb 23, 2026
9cbbaf8
Install infrastructure deps explicitly before top-level packages
claude Feb 23, 2026
e546a75
Update export
Feb 23, 2026
179e858
Install lme4 on-demand when mixed model is selected
claude Feb 23, 2026
0e6c3d5
Update export
Feb 23, 2026
adaa984
Fix lme4: add missing RcppEigen dep to keep list and explicit install
claude Feb 23, 2026
3afbdcf
Show actual lme4 load error instead of generic message
claude Feb 23, 2026
9f8fad6
Update export
Feb 23, 2026
6e0876f
Use nlme::lme for continuous mixed models (always available in base R)
claude Feb 23, 2026
833e7be
Update export
Feb 23, 2026
fbf5834
Add README with app description, features, and quick start guide
claude Feb 27, 2026
258e9c9
Add PDF fallback via browser print dialog when html2pdf.js unavailable
claude Feb 27, 2026
3aead31
Update README with PDF/Text download options, revert PDF fallback
claude Feb 27, 2026
0b29be9
Update README.md
jimbono4-cpu Feb 27, 2026
2b57e40
Update README.md
jimbono4-cpu Mar 2, 2026
c1fe259
Update README.md
jimbono4-cpu Mar 2, 2026
4887cb2
Update README.md
jimbono4-cpu Mar 2, 2026
c0d565c
Update README.md
jimbono4-cpu Mar 2, 2026
0977537
Update README.md
jimbono4-cpu Mar 2, 2026
7ada2e3
Update README.md
jimbono4-cpu Mar 2, 2026
cda57cc
Update README.md
jimbono4-cpu Mar 2, 2026
266a8b7
Update README.md
jimbono4-cpu Mar 2, 2026
825d9fb
Update README.md
jimbono4-cpu Mar 2, 2026
75761c7
Add files via upload
jimbono4-cpu Mar 2, 2026
56994c5
Update README.md
jimbono4-cpu Mar 2, 2026
c1a8067
Update README.md
jimbono4-cpu Mar 2, 2026
7f43b90
Add files via upload
jimbono4-cpu Mar 2, 2026
ffe0327
Update README.md
jimbono4-cpu Mar 2, 2026
559af0d
Update README.md
jimbono4-cpu Mar 2, 2026
1f6675f
Add files via upload
jimbono4-cpu Mar 2, 2026
f1be545
Update README.md
jimbono4-cpu Mar 2, 2026
90e03d8
Update index.html
jimbono4-cpu Mar 5, 2026
ffe4dc5
Update loading screen text: data never leaves your computer
claude Mar 5, 2026
20b6f7d
Add GoatCounter analytics and update privacy messaging
claude Mar 5, 2026
ef6bba0
Deploy site
Mar 5, 2026
bbc74de
Create CNAME
jimbono4-cpu Mar 10, 2026
f078b74
Fix: aggressively hide Shinylive default loading screen so custom pur…
claude Mar 5, 2026
30a0a6b
Delete CNAME
jimbono4-cpu Mar 5, 2026
488d611
Update README.md
jimbono4-cpu Mar 5, 2026
d4b8a18
Update README.md
jimbono4-cpu Mar 5, 2026
9fb4672
Update README.md
jimbono4-cpu Mar 5, 2026
d2c0fb0
Add feedback & bug report link to site footer
claude Mar 5, 2026
de71159
Change feedback link to open new issue directly
claude Mar 5, 2026
da35b5c
Update README.md
jimbono4-cpu Mar 5, 2026
3104ed4
Add SEO: meta tags, structured data, sitemap, and robots.txt
claude Mar 9, 2026
7d2d905
Update SEO content to reflect actual app features
claude Mar 9, 2026
165beea
Update README.md
jimbono4-cpu Mar 10, 2026
39997d9
Update loading screen UX, privacy messages, and add GitHub star button
claude Mar 10, 2026
2a3fe80
Move Star on GitHub and Feedback buttons to top-right to avoid overla…
claude Mar 10, 2026
89b418e
Create CNAME
jimbono4-cpu Mar 10, 2026
b420632
Add RDS file upload support
claude Mar 10, 2026
c78d805
Add .rda and .RData file upload support
claude Mar 11, 2026
6b55ac5
Update README.md
jimbono4-cpu Mar 11, 2026
073f10c
Update README.md
jimbono4-cpu Mar 11, 2026
33f9312
Update README.md
jimbono4-cpu Mar 11, 2026
24a8387
Update README.md
jimbono4-cpu Mar 11, 2026
308f5d9
Update README.md
jimbono4-cpu Mar 12, 2026
6a10549
SEO: add crawlable content, update meta tags for WebR keywords
claude Mar 13, 2026
030d648
Report all package versions in exported reports and LLM manifest
claude Mar 16, 2026
fe095e5
Report only packages actually used in the current analysis
claude Mar 17, 2026
a3ba088
Regenerate docs/app.json with context-aware package list
claude Mar 17, 2026
d23b787
Track all packages at their actual call sites
claude Mar 17, 2026
7a31bb9
Include stats package in reported packages when a model is fitted
claude Mar 17, 2026
9686f70
Add files via upload
jimbono4-cpu Mar 23, 2026
27a136e
Implement SEO audit quick wins: noindex, favicon, FAQPage schema, enh…
claude Mar 23, 2026
1264482
Add files via upload
jimbono4-cpu Mar 23, 2026
c8541ad
Delete CNAME
jimbono4-cpu Mar 23, 2026
db087c7
Create CNAME
jimbono4-cpu Mar 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
__pycache__/
*.pyc

# R
.Rhistory
.RData
.Rproj.user/
*.Rproj

# Shinylive cache (large binary assets, downloaded at export time)
.shinylive/
177 changes: 177 additions & 0 deletions Automated_Methods_and_Results_Drafting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Optional Step: Automated Drafting of Methods and Results for Peer-Reviewed Publications

## Overview

This optional step allows users to generate a **draft Methods and Results section**, written in the style of a peer-reviewed journal article, based strictly on:

- Information provided by the user about the study context and design
- The statistical methods actually executed by the app
- The numerical results, tables, and plots produced by the app
- The exact R commands used to perform the analyses

The aim is **not** to replace scientific judgment or authorship, but to:
- Save time on first drafts
- Improve consistency and completeness
- Ensure alignment between analyses, code, and written reporting
- Support reproducible, transparent reporting

The generated text is intended as a **draft for review, editing, and approval by the user**.

---

## User-Provided Study Information

Before generating text, the user is prompted to complete a short structured form capturing information that **cannot be inferred from the data alone**.

### Required Fields

The user will be asked to provide:

#### 1. Study Design
Examples:
- Randomised controlled trial (individual or cluster)
- Cohort study
- Cross-sectional study
- Case–control study
- Interrupted time series
- Quasi-experimental study

#### 2. Study Setting
Examples:
- Country or region
- Healthcare, educational, community, or other setting
- Time period of data collection (if applicable)

#### 3. Participants
- Inclusion criteria
- Exclusion criteria
- Any relevant eligibility restrictions

#### 4. Timepoint Definitions
- Definition of baseline
- Follow-up timepoints
- Primary analysis timepoint
- Any secondary or sensitivity analysis timepoints

#### 5. Outcome Definitions
For each outcome:
- Outcome name (exact name to be used in the manuscript)
- Outcome type (continuous, binary, count, time-to-event)
- Measurement instrument or source (if relevant)
- Direction of effect (higher = better/worse, if relevant)
- Primary vs secondary outcome designation

All user inputs are treated as **authoritative** and are not modified or inferred by the system.

---

## Automatically Captured Analysis Information

The app automatically constructs a structured **analysis manifest** containing:

### Statistical Methods
- Descriptive statistics produced
- Statistical models fitted
- Model formulae
- Link functions and distributions
- Covariate adjustment sets
- Random effects or clustering specifications
- Robust standard errors or variance estimators
- Multiple imputation or missing data handling methods (if used)
- Sensitivity or secondary analyses run

### Software and Code
- R version
- Package names and versions
- Exact R commands executed (or a reproducible template populated with user-specific choices)

### Results
- Sample sizes and flow counts
- Summary statistics
- Model estimates, standard errors, confidence intervals, and p-values
- Generated tables
- Generated plots and figure captions

No raw individual-level data are sent to the language model.

---

## LLM Drafting Step

### Inputs to the LLM

The language model receives **only**:
- The user-provided study information
- The structured analysis manifest
- The generated tables and plots
- The executed R commands

### Outputs from the LLM

The model generates:
- A **Methods section**, including:
- Study design and setting
- Participants and eligibility criteria
- Outcome definitions
- Statistical analysis methods
- Software and reproducibility statement
- A **Results section**, including:
- Participant flow and sample characteristics
- Primary and secondary outcome results
- In-text references to tables and figures
- Descriptions of plots consistent with journal conventions

The writing style is neutral, precise, and appropriate for submission to a peer-reviewed journal.

---

## Hallucination Prevention Instruction (Mandatory)

The following instruction is explicitly included in every LLM prompt:

> **Important instruction to the language model**
>
> - Use *only* the information provided in the structured inputs.
> - Do **not** invent, infer, assume, or embellish any methods, results, study characteristics, or interpretations.
> - Do **not** introduce statistical methods, analyses, covariates, or outcomes that are not explicitly listed.
> - Do **not** report values, sample sizes, p-values, confidence intervals, or effect estimates that are not present in the supplied results.
> - If required information is missing, state this explicitly (e.g. “The study setting was not specified”).
> - Do not add causal language unless explicitly appropriate for the stated study design.
> - Do not include a discussion or interpretation of findings beyond factual reporting.

The model’s role is strictly **translation from structured truth to narrative text**, not interpretation or inference.

---

## User Review and Export

After generation:
- The draft Methods and Results sections are displayed to the user
- All tables and plots are shown alongside the text
- Users can copy, download, or export the content (e.g. Markdown, Word, or Quarto)
- The user remains fully responsible for:
- Accuracy
- Interpretation
- Journal-specific formatting
- Final approval of the manuscript text

---

## Intended Use and Limitations

- The generated text is a **draft**, not a final manuscript
- It does not replace domain expertise, peer review, or editorial judgment
- It is designed to support reproducible reporting and reduce clerical burden
- It is especially suitable for:
- Standard regression analyses
- Pre-specified analysis plans
- Grant, protocol, or manuscript drafting workflows

---

## Summary

This optional step provides a controlled, transparent way to transform:
**data → analysis → results → publication-style reporting**

By combining user-supplied study context with machine-captured analytical truth, the system enables fast, accurate, and reproducible drafting of Methods and Results sections while explicitly guarding against hallucination or over-interpretation.
Loading
Loading