楼主: nieqiang110
7858 14

[问答] R语言实现probit模型的工具变量回归以及检验 [推广有奖]

11
nieqiang110 学生认证  发表于 2021-5-2 08:43:03
llb_321 发表于 2021-3-28 20:31
ivprobit
Description
lib_321老师,请教您,怎么搜索R在github里的包?谢谢

12
llb_321 在职认证  发表于 2021-5-2 17:45:21
nieqiang110 发表于 2021-5-2 08:43
lib_321老师,请教您,怎么搜索R在github里的包?谢谢
我一般在https://github.com/里右上角有个搜索栏,比如找ivmodel这个包,输入ivmodel language:R就可以
我试过:
iv probit language:R

weak iv language:R

13
nieqiang110 学生认证  发表于 2021-5-2 18:17:56
llb_321 发表于 2021-5-2 17:45
我一般在https://github.com/里右上角有个搜索栏,比如找ivmodel这个包,输入ivmodel language:R就可以[e ...
感谢lib_321老师,你的回答给我帮了大忙

14
我要我的滋味sd 发表于 2024-9-21 16:46:31
同样R控,请问你们这个问题解决了吗?

15
我要我的滋味sd 发表于 2024-9-26 09:17:09
llb_321 发表于 2021-3-31 21:49
#ivprobit()的源码看了下:
第一步是用内生变量对工具变量做lm回归;
第二步是用Y对工具变量和第一步的残 ...
看了一下说明还是没搞明白,哪个位置放哪种变量。

Usage
ivprobit(formula, data)

Arguments
    formula y~x|y1|x2 whre y is the dichotomous l.h.s.,x is the r.h.s.   
            exogenous variables,y1 is the r.h.s. endogenous variables and
            x2 is the complete set of instruments
    data    the dataframe
然后它显示了相应的示例:

data(eco)

pro<-ivprobit(d2~ltass+roe+div|eqrat+bonus|ltass+roe+div+gap+cfa,eco)

summary(pro)
如果我符合指令的解释,

y= d2 = dichotomous l.h.s.
x= ltass+roe+div = the r.h.s. exogenous variables
y1= eqrat+bonus = the r.h.s. endogenous variables
x2= tass+roe+div+gap+cfa = the complete set of instruments

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-27 13:06