Skip to main content
Glama
seanshin0214

Dr. QuantMaster MCP Server

by seanshin0214

parallel_trends_check

Validate parallel trends assumption in difference-in-differences analysis using visual, statistical, or placebo approaches to ensure causal inference reliability.

Instructions

DID 평행추세 검정 가이드

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pre_periodsYes사전 기간 수
approachNo검정 방법

Implementation Reference

  • The handler function implementing the parallel_trends_check tool. It returns guidance on parallel trends checks for DID, including visual, statistical, and placebo approaches, along with R and Stata code examples.
    function handleParallelTrendsCheck(args: Record<string, unknown>) {
      return {
        pre_periods: args.pre_periods,
        approaches: {
          visual: "사전 기간 처치/통제 그룹 추세 비교 그래프",
          statistical: "사전 기간 시간×처치 상호작용항 유의성 검정",
          placebo: "가짜 처치 시점에서 효과 없음 확인"
        },
        r_code: "feols(y ~ i(time, treat, ref = -1) | id + time, data)",
        stata_code: "reghdfe y i.time#1.treat, absorb(id time) cluster(id)"
      };
    }
  • Registration of the parallel_trends_check tool in the tools array, including its name, description, and input schema definition.
    {
      name: "parallel_trends_check",
      description: "DID 평행추세 검정 가이드",
      inputSchema: {
        type: "object",
        properties: {
          pre_periods: { type: "number", description: "사전 기간 수" },
          approach: { type: "string", enum: ["visual", "statistical", "placebo"], description: "검정 방법" },
        },
        required: ["pre_periods"],
      },
  • Input schema for the parallel_trends_check tool, defining parameters pre_periods (required, number) and approach (string enum).
    inputSchema: {
      type: "object",
      properties: {
        pre_periods: { type: "number", description: "사전 기간 수" },
        approach: { type: "string", enum: ["visual", "statistical", "placebo"], description: "검정 방법" },
      },
      required: ["pre_periods"],
  • Switch case in handleToolCall that routes calls to parallel_trends_check to its handler function.
    case "parallel_trends_check":
      return handleParallelTrendsCheck(args);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/seanshin0214/quantmaster-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server