r - 具有固定效应的线性概率模型?
问题描述
如果我想估计具有(区域)固定效应的线性概率模型,这与仅运行固定效应回归相同吗?也许我被语言绊倒了。我的目标是估计婴儿奖金的效果。我的因变量是 NEWBORN 的二元指标,我感兴趣的主要自变量是接收婴儿奖金的指标。我控制了年龄、年龄平方、教育、婚姻状况和家庭收入。
我应该使用:
## 1.) Linear Probability
LPM <- lm(newborn ~ treatment + age + age_sq + highest_education + marital_stat +
hh_income_log, data=fertility_15_45)
或者
## 2.) FE Model
FE_model <- plm(newborn ~ treatment + age + age_sq + highest_education + marital_stat +
hh_income_log, data = fertility_15_45, index="region", model="within")
解决方案
您可能希望在 LPM 中添加区域虚拟对象以获得区域固定效果。例子:
library(plm)
data(Cigar)
summary(plm(I(sales > 121.2) ~ price + pop, data=Cigar, model="within", index="state"))$coe
# Estimate Std. Error t-value Pr(>|t|)
# price -2.880255e-03 2.626505e-04 -10.9661107 7.519348e-27
# pop -6.922327e-06 1.311006e-05 -0.5280165 5.975758e-01
summary(lm(I(sales > 121.2) ~ 0 + price + pop + factor(state), data=Cigar))$coe[1:2, ]
# Estimate Std. Error t-value Pr(>|t|)
# price -2.880255e-03 2.626505e-04 -10.9661107 7.519348e-27
# pop -6.922327e-06 1.311006e-05 -0.5280165 5.975758e-01
推荐阅读
- android - 在android设备中运行命令行java
- c# - 使用 Interop.Word 将 word doc 转换为 Image 获取具有黑色背景的图像
- javascript - 在管道 RxJS Angular 中按标签排序
- c - 是否可以提前知道 EC 签名的大小,或者在 OperSSL 中设置 EC 签名大小?
- node.js - RTC 数据通道无法在 aws ec2 上工作
- windows - “/”应用程序中的服务器错误。由于对象的当前状态,操作无效
- amazon-web-services - 找不到正在运行的 aws 实例
- sql - 在同一个表上创建多个索引以减少大型查询的执行时间
- powerbi - DAX/Power Bi - 如何计算共享点列表中具有相同 ID 的行
- cypress - 如果断言失败则停止测试