marginal_effects_guide
Calculate and interpret marginal effects for statistical models including logit, probit, poisson, and tobit. Understand AME, MEM, and MER effect types with interaction considerations.
Instructions
한계효과 계산 및 해석 가이드
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_type | Yes | 모형 | |
| effect_type | No | 한계효과 유형 | |
| interaction | No | 상호작용항 포함 |
Implementation Reference
- src/tools/index.ts:1747-1758 (handler)The handler function that implements the logic for the marginal_effects_guide tool, providing explanations of marginal effect types and code snippets for R and Stata.function handleMarginalEffectsGuide(args: Record<string, unknown>) { return { model_type: args.model_type, effect_types: { ame: "Average Marginal Effect - 평균적 한계효과", mem: "Marginal Effect at Mean - 평균값에서 한계효과", mer: "Marginal Effect at Representative values" }, r_code: "margins::margins(model)", stata_code: "margins, dydx(*)" }; }
- src/tools/index.ts:497-505 (schema)Input schema defining parameters for the marginal_effects_guide tool: model_type (required), effect_type, and interaction.inputSchema: { type: "object", properties: { model_type: { type: "string", enum: ["logit", "probit", "poisson", "tobit"], description: "모형" }, effect_type: { type: "string", enum: ["ame", "mem", "mer"], description: "한계효과 유형" }, interaction: { type: "boolean", description: "상호작용항 포함" }, }, required: ["model_type"], },
- src/tools/index.ts:494-506 (registration)Tool registration object in the tools array, including name, description, and inputSchema.{ name: "marginal_effects_guide", description: "한계효과 계산 및 해석 가이드", inputSchema: { type: "object", properties: { model_type: { type: "string", enum: ["logit", "probit", "poisson", "tobit"], description: "모형" }, effect_type: { type: "string", enum: ["ame", "mem", "mer"], description: "한계효과 유형" }, interaction: { type: "boolean", description: "상호작용항 포함" }, }, required: ["model_type"], }, },
- src/tools/index.ts:854-855 (registration)Switch case in handleToolCall that routes calls to the marginal_effects_guide handler.case "marginal_effects_guide": return handleMarginalEffectsGuide(args);