ml_for_causal
Apply machine learning methods like Double ML and Causal Forest to estimate causal effects including ATE, ATT, CATE, and LATE for quantitative research.
Instructions
인과추론용 ML 가이드 (Double ML, Causal Forest)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | 방법 | |
| target | No | 추정 대상 |
Implementation Reference
- src/tools/index.ts:1924-1933 (handler)The handler function implementing the ml_for_causal tool. It takes input args, extracts the method (e.g., double_ml, causal_forest), and returns a description of the method along with sample R code for implementation.function handleMlForCausal(args: Record<string, unknown>) { return { method: args.method, description: { double_ml: "Debiased/Double ML - nuisance parameter estimation with ML", causal_forest: "Heterogeneous treatment effects via random forests" }, r_code: "library(DoubleML)\n# or library(grf) for causal forest" }; }
- src/tools/index.ts:717-728 (schema)The tool definition including name, description, and inputSchema for validation (method required, target optional). This is part of the exported tools array.{ name: "ml_for_causal", description: "인과추론용 ML 가이드 (Double ML, Causal Forest)", inputSchema: { type: "object", properties: { method: { type: "string", enum: ["double_ml", "causal_forest", "lasso_iv", "honest_tree"], description: "방법" }, target: { type: "string", enum: ["ate", "att", "cate", "late"], description: "추정 대상" }, }, required: ["method"], }, },
- src/tools/index.ts:890-890 (registration)Registration of the tool handler in the main handleToolCall switch statement, mapping the tool name to its handler function.case "ml_for_causal":