
Genomics, Precision Medicine, Data, Analysis, Visualization, R, Biostatistics
- Tweets463
- Following52
- Followers1.4K
- Likes52

ALT The four base-R regression diagnostic plots for a model of sales on YouTube advertising budget, a two-by-two grid of open black circles; three of the four panels also carry a red trend line. Top left, "Residuals vs Fitted": residuals scattered around zero with a red line that stays close to flat, while the vertical spread widens towards the right. Top right, "Q-Q Residuals": standardized residuals from about -2.6 to 2.2 lying along a grey dashed reference line, against theoretical quantiles from -3 to 3; this is the panel with no red line. Bottom left, "Scale-Location": the red line climbs from about 0.6 to about 1.2 across the fitted-value axis, and the vertical spread of the points widens with it. Bottom right, "Residuals vs Leverage": leverage running from about 0.005 to just past the 0.020 tick, every standardized residual inside plus or minus 3, and no Cook's distance contour in view. The same three rows, 26, 36 and 179, are labelled on all four panels.

ALT Subgroup forest plot titled "Time to first adverse event by subgroup", with a log x-axis labelled "Hazard ratio (Active vs Placebo, log scale)" marked at 0.5, 1.0, 2.0 and 4.0 and a dashed vertical reference line at 1.0. Five rows run top to bottom, each a blue point with a horizontal 95% confidence-interval whisker, and a right-hand text column prints the hazard ratio and interval: Overall 2.03 (1.50, 2.74), Female 1.78 (1.21, 2.62), Male 2.34 (1.45, 3.80), the row labelled "< 65 years" 1.64 (0.74, 3.60), and the row labelled ">= 65 years" 2.09 (1.51, 2.89). Every point sits to the right of the reference line. Four of the five whiskers stay clear of it; only the "< 65 years" whisker reaches back across 1.0, stretching from about 0.74 to about 3.60 and making it by far the widest interval on the figure.

ALT Scatter plot titled "coord_cartesian keeps all points in the fit", with an x-axis labelled "Horsepower" with ticks at 100, 200 and 300 and a y-axis labelled "Miles per gallon" running from 10 to 25. Around twenty-six blue points, spanning roughly 60 to 335 horsepower, show mileage falling as horsepower rises. A straight dark grey least-squares line crosses the panel from upper left to lower right and runs off the top and bottom edges of the plotting area, because it is fitted on all thirty-two cars including the six whose mileage sits above the zoomed window and is therefore out of view.

ALT Line chart titled "ETS forecast vs. actual (held-out 1959-1960)", with a y-axis labelled "Passengers (thousands)" running from about 100 to just over 600 and an x-axis labelled "Year" covering 1949 through 1960. Monthly airline passengers are drawn in black from 1949 to 1958, rising steadily with a yearly wave whose swings widen as the level climbs. From 1959 the ETS forecast continues as a blue line repeating that seasonal wave, wrapped in shaded 80% and 95% prediction intervals that fan out with the horizon. The actual observed values for 1959 and 1960 are drawn in orange above the blue forecast line, running near the top of the intervals through both summers.

ALT A bar chart titled 'A null comparison: no real difference exists', with y-axis 'False positives (genes at 5% FDR)'. The left red bar, 'Per-cell Wilcoxon (cells as replicates)', reaches 86. The right position, 'Pseudobulk DESeq2 (donors as replicates)', shows no bar at all - its value is 0. Under a comparison with no real signal, the per-cell test still calls 86 genes significant while pseudobulk correctly calls none.

ALT A scoreboard card comparing four ways to choose the number of clusters k on scaled USArrests with k-means. Four plates name each method's criterion and its answer: Silhouette, average silhouette width (peak), 2; NbClust(), 26 indices under majority rule, 2; Gap statistic, gap vs. random reference (smallest k within 1 SE of the best), 3; Elbow, within-cluster sum of squares (bend), 4. Below, a tile chart counts how NbClust()'s indices voted across k = 2 to 10: 11 chose 2, seven chose 6, two chose 3, and one each chose 4, 5, 9 and 10, with a further two proposing 0, off the ballot. Caption: there is no single right answer - shortlist, then pick the k you can interpret.

ALT A four-step decision arc, top to bottom. Title: R code too slow? Work the arc in order - the first Yes is almost always the fix. 1: looping to do whole-vector work? Vectorize - free, and usually the largest win; beneath it, bench::mark() on 20,000 rows gives 363.6 ms and 1.49 GB grown with c(), 538.7 microseconds and 179.06 KB pre-allocated, 23.5 microseconds and 156.3 KB vectorized. 2: data bigger than RAM? Go out-of-memory, Arrow or DuckDB. 3: CPU-bound with independent chunks? Parallelize, future or furrr - spends cores, so it's last. 4: no to all three - profile first, the bottleneck is elsewhere.

ALT Two Kaplan-Meier panels side by side on matched axes, built from the same CDISC pilot ADTTE. The left panel, labelled CORRECT for Surv(AVAL, 1 - CNSR), shows three treatment-arm curves falling steeply, a Placebo median of 33 days and 217 of 252 subjects used as events. The right panel, labelled WRONG for Surv(AVAL, CNSR), shows the same arms holding a long plateau near 0.62 before dropping sharply at the end, a Placebo median of 211 days and only 35 of 252 subjects used as events. Neither curve ever rises. The caption reads: the tell is the events column.


