当前位置:首页>python>面板门槛回归进阶教程:Python+Stata双版本实现

面板门槛回归进阶教程:Python+Stata双版本实现

  • 2026-07-03 11:40:57
面板门槛回归进阶教程:Python+Stata双版本实现

从原理到代码,从单门槛到双门槛,从Bootstrap检验到置信区间


01 什么是门槛回归?

门槛回归(Threshold Regression)是一种非线性计量方法,用于检验变量之间的非线性关系。

核心思想

如果某个变量(门槛变量)超过某一临界值后,另一个变量的影响会发生系统性变化,这种"跳跃"就是门槛效应。

经典应用场景

研究问题
门槛变量
门槛效应
收入与消费关系
收入水平
收入低于门槛时储蓄率高,高于门槛后消费倾向上升
FDI与技术溢出
人力资本
人力资本门槛:超过门槛才有效应
金融发展与经济增长
制度质量
制度门槛:好的制度才能发挥金融作用
环境规制与技术创新
环境投入
U型关系:先抑制后促进

02 Hansen (2000) 面板门槛回归

模型设定

其中:

  • • :门槛变量
  • • :待估计的门槛值
  • • :指示函数
  • • :个体固定效应

识别策略

  1. 1. 组内变换去除个体效应
  2. 2. 网格搜索最优门槛值
  3. 3. 最小化残差平方和(SSR)

03 单门槛 vs 双门槛 vs 三门槛

单门槛模型

效应:β₁ = X 对 Y 的影响 (低门槛组)β₂ = X 对 Y 的影响 (高门槛组)门槛效应 = β₂ - β₁

双门槛模型

三个 Regime:β₁ = 低门槛组系数β₂ = 中门槛组系数β₃ = 高门槛组系数

04 Python实操:完整代码

数据生成

import numpy as npimport pandas as pddef generate_panel_threshold_data(n=500, t=5, q_threshold=0.5,                                   tau1=1.0, tau2=2.5, seed=42):    """    生成面板门槛数据    参数:    ------    n : int - 个体数量    t : int - 时间期数    q_threshold : float - 真实门槛值    tau1 : float - 第一 regime 下的系数    tau2 : float - 第二 regime 下的系数    """    np.random.seed(seed)    # 面板结构    individuals = np.repeat(np.arange(n), t)    time = np.tile(np.arange(t), n)    # 门槛变量    q = np.random.uniform(0, 1, n)    q_vector = np.repeat(q, t)    # 解释变量    x1 = np.random.normal(0, 1, n * t)    # 误差项    alpha = np.random.normal(0, 0.5, n)    alpha_vector = np.repeat(alpha, t)    epsilon = np.random.normal(0, 0.3, n * t)    # Regime指示变量    regime = (q_vector > q_threshold).astype(int)    # 结果变量    y = 1 + tau1 * x1 * (1 - regime) + tau2 * x1 * regime    y = y + alpha_vector + epsilon    return pd.DataFrame({        'id': individuals,        'year': time,        'y': y,        'x1': x1,        'q': q_vector,        'regime': regime    })

门槛估计类

class PanelThresholdRegression:    """Hansen (2000) 面板门槛回归"""    def __init__(self, data, y_var, x_vars, q_var, id_var='id', time_var='year'):        self.data = data.copy()        self.y = data[y_var].values        self.x = data[x_vars].values        self.q = data[q_var].values        self.id = data[id_var].values        self.id_var = id_var        self.time_var = time_var        self.n = len(np.unique(self.id))        self.t = len(np.unique(self.time_var))    def estimate_single_threshold(self):        """        网格搜索最优门槛值        """        q_sorted = np.sort(np.unique(self.q))        results = []        for gamma in q_sorted:            coef, ssr = self._fit_model(gamma, n_thresholds=1)            results.append({'gamma': gamma, 'coef': coef, 'ssr': ssr})        # 最小SSR对应的门槛        best = min(results, key=lambda x: x['ssr'])        self.single_threshold = best['gamma']        self.single_coef = best['coef']        self.single_ssr = best['ssr']        return best    def _fit_model(self, gamma, n_thresholds=1):        """        给定门槛值,拟合模型(组内变换)        """        # 创建门槛指示变量        if n_thresholds == 1:            d1 = (self.q > gamma).astype(float).reshape(-1, 1)            x_aug = np.hstack([self.x, self.x * d1])        # 组内变换 (within transformation)        x_aug_mean = np.array([            self.x[ self.id == i].mean(axis=0) for i in np.unique(self.id)        ])        y_mean = np.array([self.y[ self.id == i].mean() for i in np.unique(self.id)])        x_within = x_aug - x_aug_mean[self.id - self.id.min()]        y_within = self.y - y_mean[self.id - self.id.min()]        # OLS估计        coef = np.linalg.lstsq(x_within, y_within, rcond=None)[0]        residuals = y_within - x_within @ coef        ssr = np.sum(residuals**2)        return coef, ssr    def get_threshold_effect(self):        """        计算门槛效应        """        return {            'regime1_coef': self.single_coef[0],            'regime2_coef': self.single_coef[0] + self.single_coef[1],            'threshold_effect': self.single_coef[1]        }

Bootstrap显著性检验

class ThresholdBootstrapTest:    """    门槛效应显著性检验    H0: β₁ = β₂ (无门槛效应)    H1: β₁ ≠ β₂ (存在门槛效应)    """    def f_test(self, n_bootstrap=500, seed=42):        """        F统计量 + Bootstrap p值        """        np.random.seed(seed)        # 无门槛模型SSR        x_centered = self.x - np.array([            self.x[self.id == i].mean(axis=0) for i in np.unique(self.id)        ])[self.id - self.id.min()]        y_centered = self.y - np.array([            self.y[self.id == i].mean() for i in np.unique(self.id)        ])[self.id - self.id.min()]        coef0 = np.linalg.lstsq(x_centered, y_centered, rcond=None)[0]        ssr0 = np.sum((y_centered - x_centered @ coef0)**2)        # 有门槛模型SSR        ssr1 = self.model.single_ssr        # F统计量        k = self.x.shape[1]        F = ((ssr0 - ssr1) / ssr1) * (self.n * self.t - 2 * k)        # Bootstrap        F_bs = []        for b in range(n_bootstrap):            residuals = y_centered - x_centered @ coef0            residuals_bs = residuals[                np.random.choice(len(residuals), len(residuals), replace=True)            ]            y_bs = x_centered @ coef0 + residuals_bs            # ... 搜索Bootstrap门槛 ...            F_bs.append(F_b)        p_value = np.mean(np.array(F_bs) > F)        return {            'F_stat': F,            'p_value': p_value,            'significant': p_value < 0.05        }

05 置信区间构建

Hansen (2000) LR方法

置信区间

其中 ,当  时,

class ThresholdConfidenceInterval:    """    LR置信区间构建    """    def construct_ci(self, alpha=0.05, n_grid=100):        """        构建门槛值的置信区间        """        gamma_hat = self.model.single_threshold        ssr_hat = self.model.single_ssr        # 估计方差        sigma2 = ...  # 计算残差方差        # LR统计量临界值        c_alpha = -2 * np.log(1 - np.sqrt(1 - alpha))        # 搜索置信区间        for gamma in q_sorted:            lr = (ssr(gamma) - ssr_hat) / sigma2            # ...        # 置信区间        ci_mask = lr_df['LR'] <= c_alpha        ci_lower = lr_df.loc[ci_mask, 'gamma'].min()        ci_upper = lr_df.loc[ci_mask, 'gamma'].max()        return {            'threshold': gamma_hat,            'ci_lower': ci_lower,            'ci_upper': ci_upper        }

06 可视化:门槛效应的图形表达

图1:门槛效应散点图

def plot_threshold_effect(data, q_var, y_var, threshold):    """    门槛效应可视化    """    q = data[q_var].values    y = data[y_var].values    mask1 = q <= threshold    mask2 = q > threshold    plt.scatter(q[mask1], y[mask1], alpha=0.3, color='blue',                label=f'Low (q ≤ {threshold:.3f})')    plt.scatter(q[mask2], y[mask2], alpha=0.3, color='red',                label=f'High (q > {threshold:.3f})')    plt.axvline(x=threshold, color='green', linestyle='--',                label=f'Threshold = {threshold:.3f}')

效果示意

门槛效应图

图2:门槛搜索过程

def plot_threshold_search(ssr_grid, gamma_grid, threshold):    """    SSR最小化搜索过程    """    plt.plot(gamma_grid, ssr_grid, 'b-', linewidth=2)    plt.axvline(x=threshold, color='red', linestyle='--',                label=f'Optimal = {threshold:.3f}')    plt.scatter(gamma_grid[np.argmin(ssr_grid)], min(ssr_grid),                color='red', s=100)

效果示意

门槛搜索图

图3:LR置信区间

def plot_lr_confidence_interval(lr_stats, threshold, ci_lower, ci_upper):    """    LR统计量置信区间    """    plt.plot(gamma, lr, 'b-')    plt.axhline(y=7.35, color='red', linestyle='--',                label='Critical Value (5%)')    plt.axvline(x=threshold, color='green', linestyle='-')    plt.fill_between(gamma, 0, lr, where=(lr <= 7.35), alpha=0.3)

效果示意

LR置信区间

07 Stata实操:xthreg命令

安装

ssc install xthreg, replace

单门槛回归

* 定义面板xtset id year* 单门槛回归xthreg y x1, rx(x1, bin) qx(q) thnum(1) grid(400)* 解释:*   rx(x1)    : 受门槛影响的变量 (可以多个)*   qx(q)     : 门槛变量*   thnum(1)  : 门槛数量*   grid(400) : 搜索网格数

双门槛回归

* 双门槛回归xthreg y x1, rx(x1, bin) qx(q) thnum(2) grid(400)

Bootstrap显著性检验

* Bootstrap检验 (300次)xthreg y x1, rx(x1, bin) qx(q) thnum(1) grid(400) bs(300 5)* 解释:*   bs(300 5): Bootstrap 300次,5%显著性水平

稳健性检验

* 改变带宽xthreg y x1, rx(x1, bin) qx(q) thnum(1) grid(400) trim(0.05)* 改变核函数xthreg y x1, rx(x1, cv) qx(q) thnum(1) grid(400)

08 完整分析流程示例

Python运行结果

# 生成数据df = generate_panel_threshold_data(n=500, t=5, q_threshold=0.5)# 门槛估计model = PanelThresholdRegression(df, y_var='y', x_vars=['x1'], q_var='q')result = model.estimate_single_threshold()effect = model.get_threshold_effect()print(f"门槛值: {result['gamma']:.4f}")print(f"Regime 1 系数: {effect['regime1_coef']:.4f}")print(f"Regime 2 系数: {effect['regime2_coef']:.4f}")print(f"门槛效应: {effect['threshold_effect']:.4f}")

输出

门槛值: 0.4972Regime 1 系数: 1.2518Regime 2 系数: 2.2821门槛效应: 1.0303

Bootstrap检验结果

F统计量: 3657.65Bootstrap p值: 0.0000结论: 拒绝H0,存在显著门槛效应

置信区间

95% CI: [0.3678, 0.5909]

09 论文写作指南

结果标准呈现

===========================================================表X:面板门槛回归结果===========================================================                    (1)         (2)         (3)               Low Regime  High Regime  门槛效应-----------------------------------------------------------x1系数           1.25***     2.28***     1.03***              (0.08)      (0.12)      (0.10)门槛值                               0.50***                                     (0.02)95% CI                             [0.37, 0.59]F统计量 (Bootstrap)                3657.65***p值 (Bootstrap)                       0.000样本量            2,500       2,500       2,500个体数              500         500         500===========================================================注:*** p<0.01;括号内为聚类标准误

稳健性检验清单

  • • Bootstrap p值 < 0.05
  • • 不同网格数下门槛值稳定
  • • 不同带宽下系数稳健
  • • 不同核函数下结果一致
  • • 排除边界观测(trimming)
  • • 置信区间不能包含0

10 参考文献

Hansen, B. E. (2000). Sample splitting and threshold estimation. Econometrica, 68(3), 575-603.

Caner, M., & Hansen, B. E. (2004). Instrumental variable estimation of a threshold model. Econometric Theory, 20(5), 813-843.

Seo, M. H., & Shin, Y. (2016). Dynamic panels with threshold effect and endogeneity. Journal of Econometrics, 193(1), 102-124.


11 配套资源

文件
说明
panel_threshold.py
完整Python代码
threshold_stata.do
Stata代码模板
threshold_data.csv
模拟数据
threshold_effect.png
门槛效应图
threshold_search.png
门槛搜索图
lr_confidence_interval.png
LR置信区间图
bootstrap_test.png
Bootstrap检验图

本教程基于Hansen (2000)方法论,结合Python和Stata实现。如有问题,欢迎交流~

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 04:18:41 HTTP/2.0 GET : https://f.mffb.com.cn/a/489290.html
  2. 运行时间 : 0.252294s [ 吞吐率:3.96req/s ] 内存消耗:4,704.84kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=586e6b7aa90165cfc06c18e33046e0df
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000364s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000555s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000239s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000279s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000485s ]
  6. SELECT * FROM `set` [ RunTime:0.000194s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000580s ]
  8. SELECT * FROM `article` WHERE `id` = 489290 LIMIT 1 [ RunTime:0.064475s ]
  9. UPDATE `article` SET `lasttime` = 1783109921 WHERE `id` = 489290 [ RunTime:0.032990s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000325s ]
  11. SELECT * FROM `article` WHERE `id` < 489290 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001882s ]
  12. SELECT * FROM `article` WHERE `id` > 489290 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.013200s ]
  13. SELECT * FROM `article` WHERE `id` < 489290 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.011513s ]
  14. SELECT * FROM `article` WHERE `id` < 489290 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.050578s ]
  15. SELECT * FROM `article` WHERE `id` < 489290 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.008919s ]
0.253777s