Investigation: Theories as social constructs#
Scientific understanding relies on shared concepts, tools, criticism, and evidence. Social acceptance and intelligibility are important to scientific practice but do not substitute for empirical adequacy. Disagreement can reveal different targets or assumptions.
Question. Two teams analyze the same simulated study using defensible aggregation and adjustment choices, then reconcile their different estimates.
Before running: write the result you expect and what would challenge it. Data are simulated unless explicitly identified otherwise.
# Open this notebook from book/notebooks (or book/exercises).
course_path <- if (file.exists("../R/course.R")) "../R/course.R" else "book/R/course.R"
stopifnot(file.exists(course_path))
source(course_path)
set.seed(432)
d <- simulate_trials()
items <- aggregate(rt~item+frequency+length,d,mean)
team_a <- lm(rt~frequency,items)
team_b <- lm(rt~frequency+length,items)
comparison <- data.frame(team=c("A: unadjusted","B: adjusted for length"),slope=c(coef(team_a)[2],coef(team_b)[2]))
comparison
cor(items$frequency,items$length)
| team | slope |
|---|---|
| <chr> | <dbl> |
| A: unadjusted | -29.97062 |
| B: adjusted for length | -27.74949 |
Reconcile a disagreement#
Both fits can be computed correctly while estimating different conditional associations. Ask whether adjustment reflects the scientific question and measurement process. Do not resolve this by counting how many assistants or reviewers prefer each paragraph.
# Independent computation checks Team B's arithmetic, not its scientific assumptions.
X <- model.matrix(team_b)
independent <- qr.solve(X,items$rt)
stopifnot(max(abs(independent-coef(team_b)))<1e-8)
review <- data.frame(issue=c("same data?","same target?","same computation?","new evidence needed?"),finding=c("yes, simulated item summaries","no, marginal versus adjusted association","QR reproduces Team B coefficients","independent samples and a justified measurement/design model"))
review
| issue | finding |
|---|---|
| <chr> | <chr> |
| same data? | yes, simulated item summaries |
| same target? | no, marginal versus adjusted association |
| same computation? | QR reproduces Team B coefficients |
| new evidence needed? | independent samples and a justified measurement/design model |
Capstone exchange#
Exchange the complete package: question, data dictionary, provenance, analysis plan, executable code, environment, outputs, claim ledger, and AI-use record. Reproduce one figure and challenge one assumption. Return an assessment distinguishing computational disagreement, different estimands, and competing scientific explanations. Propose a discriminating observation that would change your conclusion.
Interpret and verify#
Exchange reproducibility packages, identify which disagreements are computational versus scientific, and propose evidence that could change each team’s conclusion.
Failure to consider: Common data sources, model families, and prompts can generate correlated mistakes. Multiple similar explanations need not constitute independent evidence.
Report the target, the numerical result with its units, the relevant uncertainty, and one limitation. Distinguish what is established by the simulation from what would require real data.
AI audit: critique the saved faulty claim in the companion exercise before using any live assistant. If you use AI, record the relevant suggestion, your independent check, and the final decision.
Return to information, knowledge, and understanding with a complete, auditable scientific argument.
sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS 15.7.7
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib
locale:
[1] C.UTF-8/C.UTF-8/C.UTF-8/C/C.UTF-8/C.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] fansi_1.0.3 crayon_1.5.1 digest_0.6.29
[4] utf8_1.2.2 IRdisplay_1.1 repr_1.1.4
[7] lifecycle_1.0.1 jsonlite_1.8.0 evaluate_0.15
[10] pillar_1.8.0 rlang_1.0.6 cli_3.3.0
[13] uuid_1.1-0 vctrs_0.4.1 IRkernel_1.3.0.9000
[16] tools_4.2.1 glue_1.6.2 fastmap_1.1.0
[19] compiler_4.2.1 base64enc_0.1-3 pbdZMQ_0.3-7
[22] htmltools_0.5.3