r - 使用 CAR 包进行交互类型为 null 的假设检验
问题描述
我正在尝试测试以下内容: H0: Beta2+Beta3*.16 = 0 & Ha: Beta1 + Beta2*.5 does not = 0 using the car package
iv <- ivreg(lnwage ~ educ + exper + expersq100 + disadv + city + city10 + region10_2 + region10_3 + region10_4 + region10_5 + region10_6 + region10_7 + region10_8 + region10_9 + motheduc + fatheduc | nearuniv + exper + expersq100 + disadv + city + city10 + region10_2 + region10_3 + region10_4 + region10_5 + region10_6 + region10_7 + region10_8 + region10_9 + motheduc + fatheduc, data=a2 )
cov5 <- vcovHC(iv, type="HC1")
hnull_6 <-c("exper+expersqr100*.16=0")
linearHypothesis(iv, hnull_6, vcov=cov5)
Error in constants(lhs, cnames_symb) :
The hypothesis "exper+expersqr100*.16=0" is not well formed: contains bad coefficient/variable names.
如何使用 car 包成功设置我的 null 而不会发生错误?谢谢!
解决方案
推荐阅读
- javascript - 使用“页眉和页脚脚本”Wordpress 插件
- python - 什么都不做与通过“”的技术差异
- php - 使用 Unisharp/Laravel-filemanager 编辑应用程序的特定文件夹
- mysql - 安装 phpmyadmin 期间因用户错误而拒绝访问
- networking - 发送包含 IPv4 和 TCP SYN 的原始以太网数据包,但未在响应数据包中获得 SYN/ACK 数据包
- r - 如何在r中的ggplot中连接NA干预的点?
- python - 如果我在 django 视图中返回 None 并在中间件中处理它怎么办?
- cython - 融合类型:未声明的名称未内置:双
- java - 需要正则表达式来解析java中的where子句查询
- phpstorm - 在 PhpStorm 2019.2.3 功能“重新格式化代码”中以错误的方式格式化刀片代码