Cheatsheet
Print this page before the session
Print this page (Ctrl+P / Cmd+P) or keep it open on a second device. It has everything you need for the day.
URLs for the session
| URL | |
|---|---|
| Course site | https://codemoreh.github.io/applied-replication/ |
| Browser lab | browser lab |
| Workspace download (zip) | https://github.com/CodeMoreh/replication-lab/archive/refs/heads/main.zip |
| Submit your result | class-results form |
| Live multiverse | results page |
| Specification menu | spec menu |
| OSF fork – data | https://osf.io/6zqct/ |
| Full SCORE dossier on the paper | https://osf.io/h7432/ |
| Multi100 project | https://osf.io/q5h2c/ |
Submitting to the chart
You submit twice, and the two are different in kind. The browser lab and the workspace use the same function names.
Task 4 – the exploratory dot (open circle). Nothing in this task is preregistered.
try_spec(...)– one argument per axis, every one defaulting to the baseline you reproduced.try_spec(estimator = "pooled_cl")changes one thing and leaves the rest alone.my_experiments()– prints everything you have tried so far, side by side, with only the axes that varied.submit_exploration()– sends the most recent try to the chart, labelled as exploration. Open the printed link and press Send. It also prints your tag, such asamber-otter-42, which marks your circles on the class chart;submit_exploration(nickname = "...")sets your own instead.
Task 5 – the declared dot (filled circle). Here you preregister one specification before you run it.
- Preregister. Make one choice on every axis in the preregistration cell (
claim_align <- TRUEis already set for you), then runprereg(). The completed cell is your preregistration. In the workspace, render the report before step 5, as set out under Rendering the report; on the browser lab page, copy the whole cell into your notes. build_model(...)– write your specification as a formula. It accepts only code that matches your preregistration and tells you what is off when it does not.run_spec(my_model)– computes your specification and shows the coefficient, its claim-aligned partial r (below zero supports the claim), and, on the browser lab page, your placement against the grid of 840 specifications.report_result()– no arguments needed. It builds your submission from the preregistration and prints a clickable, pre-filled form link; open it and press Send. It reuses your tag from Task 4. In the browser lab, if you have reloaded the page since then, pass the tag back withreport_result(nickname = "your-tag").
If any of that stalls, work down the list below.
A stalled browser lab
The browser lab runs R inside your browser tab, and browsers occasionally baulk. Work down this list. Each step is more certain than the one before, and step 4 puts your dot on the chart whatever your machine does.
- Hard reload, then rerun. Reload the page clearing the cache (Ctrl+Shift+R / Cmd+Shift+R), wait for R to restart, and rerun the chunks above the one that failed – webR needs the earlier chunks to have run in this session before a later one will work.
- Switch browser. If a chunk still will not run, open the browser lab in a different browser (Chrome, Edge, or Firefox). A fresh browser clears most stubborn webR problems.
- Follow the shared screen – the ‘buddy chunk’. If your machine simply will not cooperate, watch the facilitator run the same chunk on the shared screen and read the printed results from there. You miss no step by doing this.
- Read your printed result to the facilitator. If
submit_exploration()orreport_result()printed your result but the form link will not open, read the printedb,se,t(orzfor a beta family),df,nand claim-alignedrto the facilitator, who adds the dot to the chart for you. The lab has already applied the claim-alignment convention, so there is nothing to convert, and no working form link is needed at your end. If a cell refuses to run at all, nothing is printed and there are no numbers to read, so give the facilitator your fourteen choices instead, and the facilitator reads the result off the grid by hand (the note below).
Last resort, facilitator-side, if a participant’s cells will not run at all: every menu specification is a row in one of the files under data/grid/. The file is named by the six Level 1 choices other than the scoring rule, joined with double underscores, in the order outcome, predictor, co-predictor, estimator, sample, weights – the baseline is mcosmo__unemp__none__fe_twoway__all__none.csv.gz – and the row inside it is picked by the scoring rule and the seven Level 2 and Level 3 choices (construction, noop, item_set, cell_weight, measure, pred_form, family, se). A beta-family row reports z in place of t. Read off estimate (the b), std_error, statistic (the t or z), df and n, and take r from the r_ca column, which is already claim-aligned. Then apply to b and t/z only the flips that the lab applies automatically. Reverse their sign for a negative framing (mcomm, mlib, mneg), and again for a GDP-growth predictor. Enter those into the form, and the dot appears without anything being fitted.
IDE quick fixes
| If … | Then … |
|---|---|
A package will not load, or feols / plm is “not found” |
Run the checker again – source("R/check_setup.R") – and run the install line that it prints; or install by hand, e.g. install.packages("fixest"). |
The renv / pak restore stalls or half-finishes |
Restart R (Session menu), then run the restore again; a second pass usually completes what the first left. |
| “Permission denied” while installing a package | Let R use a personal library it can write to – accept the offer from R to create a personal library, then reinstall. |
| A data file is “not found” | Check you opened the unzipped folder in your IDE (File → Open Folder in Positron and VS Code; the .Rproj file in RStudio), not a single file – the paths in the code are relative to that folder. |
| Something not listed here | The setup help page has the longer table, with links to the discussions where each problem was solved, and prompts to give an AI assistant. |
| Everything is stuck | Open the browser lab and carry on there. You lose nothing required. |
Rendering the report
Render your report once your preregistration block is complete and before you run your specification, so that the block is fixed in a rendered copy of the report, which carries the date on which it was rendered. In Positron and in RStudio, press the Render button at the top of the open report. In VS Code, run the Render command of the Quarto extension. In any of the three you can also run quarto render index.qmd in a terminal. On the browser lab page the same block is a cell on the page, and it updates in the tab when you run it.