Skip to content

Commit e6e850b

Browse files
committed
cipi >> {blockstrap}; exp-plan >> {adsasi}; geo-mod >> bin workflow; reg-ord >> resource
1 parent b73db6b commit e6e850b

5 files changed

Lines changed: 28 additions & 9 deletions

File tree

qmd/confidence-and-prediction-intervals.qmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@
205205
- The BCa approach can be unsatisfactory for relatively small sample sizes
206206
- Packages
207207
- [{]{style="color: #990000"}[bayesboot](https://github.com/rasmusab/bayesboot){style="color: #990000"}[}]{style="color: #990000"} - Implements Rubin's (1981) Bayesian bootstrap
208+
- [{]{style="color: #990000"}[blockstrap](https://numbats.github.io/blockstrap/){style="color: #990000"}[}]{style="color: #990000"} - Sample complete groups (“blocks”) from a grouped data frame. (just does sampling)
209+
- Implements a simple block bootstrap style sampler: instead of sampling individual rows, you sample entire groups preserving the intra-group structure.
208210
- [{]{style="color: #990000"}[boot.pval](https://cran.r-project.org/web/packages/boot.pval/){style="color: #990000"}[}]{style="color: #990000"} - Computation of bootstrap p-values through inversion of confidence intervals, including convenience functions for regression models.
209211
- Linear models fitted using `lm`,
210212
- Generalized linear models fitted using `glm` or `glm.nb`,

qmd/experiments-planning.qmd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@
114114

115115
- Packages
116116

117+
- [{]{style="color: #990000"}[adsasi](https://cran.r-project.org/web/packages/adsasi/index.html){style="color: #990000"}[}]{style="color: #990000"} - Adaptive Sample Size Simulator
118+
- The user writes a function that takes as argument a sample size and returns a boolean (for whether or not the trial is a success). The 'adsasi' functions will then use it to find the correct sample size empirically.
119+
- The unavoidable mis-specification is obviated by trying sample size values close to the right value, the latter being understood as the value that gives the probability of success the user wants (usually 80 or 90% in biostatistics, corresponding to 20 or 10% type II error).
117120
- [{]{style="color: #990000"}[BayesPower](https://cran.r-project.org/web/packages/BayesPower/index.html){style="color: #990000"}[}]{style="color: #990000"} - Sample Size and Power Calculation for Bayesian Testing with Bayes Factor
118121
- [{]{style="color: #990000"}[gsMAMS](https://cran.r-project.org/web/packages/gsMAMS/index.html){style="color: #990000"}[}]{style="color: #990000"} ([Vignette](https://joss.theoj.org/papers/10.21105/joss.06322)): an R package for Designing Multi-Arm Multi-Stage Clinical Trials
119122
- For designing group sequential multi-arm multi-stage (MAMS) trials with continuous, ordinal, and survival outcomes, which is computationally very efficient even for a number of stages greater than 3.
@@ -150,7 +153,7 @@
150153
- [Sample Size Justification](https://online.ucpress.edu/collabra/article/8/1/33267/120491/Sample-Size-Justification) (See article for more details on each type)
151154

152155
| | |
153-
|:-----------------------------------|:-----------------------------------|
156+
|:---|:---|
154157
| Type of justification  | When is this justification applicable?  |
155158
| Measure entire population  | A researcher can specify the entire population, it is finite, and it is possible to measure (almost) every entity in the population.  |
156159
| Resource constraints  | Limited resources are the primary reason for the choice of the sample size a researcher can collect.  |
@@ -162,7 +165,7 @@
162165
- Considerations when deciding on an effect size (See [Sample Size Justification](https://online.ucpress.edu/collabra/article/8/1/33267/120491/Sample-Size-Justification) \>\> What is Your Inferential Goal? for more details)
163166

164167
| | |
165-
|:-----------------------------------|:-----------------------------------|
168+
|:---|:---|
166169
| Type of evaluation  | Which question should a researcher ask?  |
167170
| Smallest effect size of interest  | What is the smallest effect size that is considered theoretically or practically interesting?  |
168171
| The minimal statistically detectable effect  | Given the test and sample size, what is the critical effect size that can be statistically significant?  |

qmd/geospatial-modeling.qmd

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
- [{gstat}]{style="color: #990000"} Kriging Functions
352352

353353
| Function | Description |
354-
|------------------------------------|------------------------------------|
354+
|----|----|
355355
| `krige` | Simple, Ordinary or Universal, global or local, Point or Block Kriging, or simulation |
356356
| `krige.cv` | kriging cross validation, n-fold or leave-one-out |
357357
| `krigeSTTg` | Trans-Gaussian spatio-temporal kriging |
@@ -679,11 +679,19 @@
679679
- At least 100 location pairs in the first bin
680680
- There should 6–8 bins before the sill (to fit the variogram model)
681681
- Try Sensitivity Analysis for low location counts (e.g. 53 locations)
682-
1. Start with $\Delta \approx 40$ which is [width = 40]{.arg-text} (first bin \~60 pairs; noisy but usable)
683-
2. Fit only *simple* variogram models (Exp, spherical)
684-
3. Downweight or ignore the first bin if needed
685-
4. Check sensitivity of the *range estimate* to:
686-
- $\Delta = 30, 20, 15, \text{and maybe}\;50$
682+
- Workflow
683+
1. Choose $N_{\text{min}}$ (See RSE table) (e.g. 75 effective pairs)
684+
2. Compute $\Delta_{\text{min}}$\
685+
$$
686+
\Delta_{\text{min}} = \sqrt{\frac{2N_{\text{min}}H^2}{n(n-1)}}
687+
$$
688+
3. Assess sensitivity of range estimate for $\Delta \gt \Delta_{\text{min}}$
689+
1. If $\Delta_{\text{min}} \approx 40$ , then start with $\Delta = 40$ which is [width = 40]{.arg-text} (first bin \~60 pairs; noisy but usable)
690+
2. Fit only *simple* variogram models (Exp, spherical)
691+
3. Downweight or ignore the first bin if needed
692+
4. Check sensitivity of the *range estimate* to:
693+
- $\Delta = 30, 20, 15, \text{and maybe}\;50$
694+
4. If results are unstable $\rightarrow$ data limitation, not a tuning failure
687695
688696
#### Types {#sec-geo-gmod-interp-krig-types .unnumbered}
689697

qmd/llms-mcp.qmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
- [R Econometrics MCP Server](https://github.com/gojiplus/rmcp/)
3737
- [Posit Skills](https://github.com/posit-dev/skills) for Claude Code (Claude Skills)
3838
- Package development, Testing, Shiny, and Quarto brand_yml, Crafting Release Posts
39+
- [Claude Code R Skills: A curated collection of Claude Code configurations for modern R use](https://github.com/ab604/claude-code-r-skills)
40+
- Modular Skills (tidyverse, rlang, performance, OOP, testing)
41+
- Enforcement Rules (security, testing, git workflow)
42+
- Workflow Commands (planning, code review, TDD)
43+
- Context Management Hooks
3944

4045
- Using MCP servers rather than the cloud service CLI tools (e.g. BigQuery CLI) provides better security control over what LLM products (e.g. Claude Code) can access, especially for handling sensitive data that requires logging or has potential privacy concerns.
4146

qmd/regression-ordinal.qmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
- Uses [{mgcv}]{style="color: #990000"} for modeling and [{sure}]{style="color: #990000"} diagnostics
8181
- Resources
8282
- [Chapter 23](https://bookdown.org/content/3686/ordinal-predicted-variable.html) (Kurz's brms, tidyverse version), Doing Bayesian Analysis by Kruschke
83+
- [Ordinal regression models made easy: A tutorial on parameter interpretation, data simulation and power analysis](https://onlinelibrary.wiley.com/doi/full/10.1002/ijop.13243) (Also in R \>\> Documents \>\> Regression \>\> ordinal)
8384
- Power and Sample Size Calculations for a Proportional Odds Model ([Harrell](https://www.fharrell.com/post/pop/))
8485
- Paired data: Use robust cluster sandwich covariance adjustment to allow ordinal regression to work on paired data. ([Harrell](https://twitter.com/f2harrell/status/1690837549340598272?s=20))
8586
- Ordered probit regression: This is very, very similar to running an ordered logistic regression. The main difference is in the interpretation of the coefficients.
@@ -2133,7 +2134,7 @@
21332134

21342135
- As with a binary outcome, the logit and probit analysis will nearly always lead to the same conclusions
21352136

2136-
- The coefficients of represent the change in the z-score (standard normal quantile) for being at or below a certain category for a one-unit change in the predictor.
2137+
- The coefficients of represent the change in the z-score (standard normal quantile) for being at or below a certain category of the response for a one-unit change in the predictor.
21372138

21382139
- [Example]{.ribbon-highlight}:\
21392140
![](_resources/Regression,_Ordinal.resources/po-probit-coef-interp-1.webp){.lightbox width="532"}

0 commit comments

Comments
 (0)