Skip to main content
Glama

sun_abraham

Read-only

Estimate interaction-weighted event-study effects for staggered treatment adoption using cohort, unit, time, and outcome columns.

Instructions

Sun-Abraham (2021) interaction-weighted event study for staggered adoption (Stata eventstudyinteract, fixest sunab). Cohort column g = first-treatment period, 0 / NaN never treated. Validation: certified parity evidence.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "g": "<g>",
      "i": "<i>",
      "t": "<t>",
      "y": "<y>"
    },
    "name": "sun_abraham"
  }
}

Input Schema

NameRequiredDescriptionDefault
gYesFirst-treatment cohort.
iYesUnit ID column
tYesTime column
yYes
detailNoPayload depth; agent is the fullest.agent
clusterNo
data_idNoData handle (d_...) from load_data; replaces data_path.
data_csvNoSmall inline table as CSV text.
as_handleNoCache the fit and return its result_id.
crit_distNoCritical values: 't' = t(G-1) as Stata and fixest (omitted = 't'); 'normal' = the pre-1.41 default.
data_pathNoAbsolute path of a data file on the server.
result_idNoHandle of an earlier fit made with as_handle=true.
covariatesNo
aggregationNoHeadline ATT; omitted = fixest_att (fixest agg='att'); event_time = equal weight per relative time (pre-1.41 default).
data_recordsNoSmall inline table as row objects.
control_groupNonevertreated
max_output_bytesNoResult byte budget (default 262144; 0 = none).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds a meaningful behavioral claim — 'certified parity evidence' — signaling results are validated against Stata/fixest, plus the never-treated encoding convention. It stops short of explaining computational cost, the effect of the 'pre-1.41 default' switches, or what the fit returns, though the output schema covers returns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short, front-loaded sentences: estimator identity first, then the key data convention, then validation status — no filler. The closing phrase 'certified parity evidence' is a little opaque, but nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 17-parameter estimator with an output schema and annotations, the description covers the essential data contract (g coding) and provenance, with remaining parameters documented in the schema. What is missing is the decision-level context: when this estimator should be preferred over sibling staggered-DiD tools, and any note that several defaults (aggregation, crit_dist) emulate fixest rather than this tool's earlier releases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

At 76% schema coverage the baseline is 3, but the description goes beyond the schema by explaining that g must be coded as first-treatment period with 0/NaN for never-treated units — a convention the schema's 'First-treatment cohort.' does not convey. It also anchors g's semantics to the Stata/fixest equivalents, which helps the agent map user data to the expected column.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific estimator, 'Sun-Abraham (2021) interaction-weighted event study for staggered adoption,' and maps it to the Stata eventstudyinteract and fixest sunab implementations, so an agent knows exactly what is being estimated. It does not, however, distinguish itself from sibling DiD estimators such as callaway_santanna or bacon_decomposition, leaving the choice between them to the agent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'for staggered adoption' implies the applicable design context, and the note that g encodes first-treatment period with 0/NaN for never-treated tells the agent what data shape is expected. But there is no explicit when-to-use/when-not guidance and no mention of the sibling alternatives (e.g., callaway_santanna, pipeline_did) that a user might otherwise pick.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.