Skip to content

Retain Std. Error column in ED() and maED() interval output#176

Merged
hreinwald merged 1 commit intodevfrom
copilot/update-ed-functions-interval-output
Mar 26, 2026
Merged

Retain Std. Error column in ED() and maED() interval output#176
hreinwald merged 1 commit intodevfrom
copilot/update-ed-functions-interval-output

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 26, 2026

ED() with interval = "tfls", "fls", or "inv" drops the Std. Error column, returning only 3 columns (Estimate, Lower, Upper). Same issue in maED() with interval = "kang". All interval modes should return 4 columns: Estimate, Std. Error, Lower, Upper.

Changes

  • R/ED.drc.R: Removed the edMat[, -2] / edColNames[-2] lines in the tfls, fls, and inv branches. The existing assembly (cbind(edMat, intMat)) now naturally yields 4 columns for all interval types.
  • R/maED.R: Added model-averaged SE (same Buckland formula already used elsewhere) to the kang branch output, producing 4 columns instead of 3.
  • Tests: Updated test-ED.R and test-maED.R expectations from ncol == 3 to ncol == 4 for affected interval types.
# Before: 3 columns (Std. Error dropped)
ED(res2, interval = "tfls")
#      Estimate   Lower   Upper
# e:50  3.44352 1.29441 9.16081

# After: 4 columns
ED(res2, interval = "tfls")
#      Estimate Std. Error   Lower   Upper
# e:50  3.44352    1.65966 1.29441 9.16081

The non-interval case (interval = "none") is unchanged — still returns Estimate + Std. Error only.

- ED.drc.R: Stop dropping SE column for tfls, fls, and inv intervals
- maED.R: Add model-averaged SE to kang interval output (4 cols)
- test-ED.R: Update fls, tfls, inv tests to expect 4 columns
- test-maED.R: Update kang test to expect 4 columns

Agent-Logs-Url: https://github.com/hreinwald/drc/sessions/54327f64-7771-4c0f-b384-0b551db9c2a6

Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
@hreinwald hreinwald merged commit 2b31222 into dev Mar 26, 2026
6 checks passed
@hreinwald hreinwald deleted the copilot/update-ed-functions-interval-output branch March 26, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants