matlab 拉格朗日LM检验,求问,做LM检验和LR检验的stata命令

本文介绍了如何在Stata中执行类似于MATLAB的拉格朗日乘子(LM)检验和逻辑似然比(LR)检验。通过xsmle命令构建了不同类型的模型,包括SDM、SAR和SEM,并进行了LR对比测试。同时,也展示了进行Wald检验的方法,以评估模型中变量的空间滞后效应。
摘要由CSDN通过智能技术生成

回复楼上,改做了LR和Wald 检验

xsmle Lngdp Score Goveff SecondaryIndustry Investment Lnpopulation stateowned ,fe model(sdm) wmat(W) type(both) nolog noeffects     #sdm模型

est store sdm_a

xsmle Lngdp Score Goveff SecondaryIndustry Investment Lnpopulation stateowned ,fe model(sar) wmat(W) type(both) nolog noeffects      #sar模型

est store sar_a

xsmle Lngdp Score Goveff SecondaryIndustry Investment Lnpopulation stateowned ,fe model(sem) emat(W) type(both) nolog noeffects      #sem模型

est store sem_a

lrtest sdm_a sar_a                        #LR test spatial lag

lrtest sdm_a sem_a                       #LR test spatial error

Wald 检验:

xsmle Lngdp Score Goveff SecondaryIndustry Investment  , wmat(W) model(sdm) robust nolog effects fe r                     #在LR之后

(xsmle y x1 x2 x3 x4)

test [Wx]Score = [Wx]Goveff = [Wx]SecondaryIndustry = [Wx]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值