如何获得felm中的拦截系数

时间:2016-05-15 08:44:05

标签: r regression

我在R中运行以下代码。我没有获得拦截系数。如何获得拦截系数?

#create covariates
x <- rnorm(4000) 
x2 <- rnorm(length(x))

#create individual and firm
id <- factor(sample(500,length(x),replace=TRUE)) 
firm <- factor(sample(300,length(x),replace=TRUE))

#effects
id.eff <- rlnorm(nlevels(id)) 
firm.eff <- rexp(nlevels(firm))

#left hand side
y <- 50000 + x + 0.25*x2 + id.eff[id] + firm.eff[firm] + rnorm(length(x))

#estimate and print result
est <- felm(y ~ x+x2 | id + firm) 

summary(est)

Call: felm(formula = y ~ x + x2 | id + firm)

给了我

Residuals: Min 1Q Median 3Q Max -3.3129 -0.6147 -0.0009 0.6131 3.2878

Coefficients: Estimate Std. Error t value Pr(>|t|)
x 1.00276 0.01834 54.66 <2e-16 ***

x2 0.26190 0.01802 14.54 <2e-16 ***
Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.02 on 3199 degrees of freedom Multiple R-squared(full model): 0.8778 Adjusted R-squared: 0.8472 Multiple R-squared(proj model): 0.4988 Adjusted R-squared: 0.3735 F-statistic(full model):28.72 on 800 and 3199 DF, p-value: < 2.2e-16 F-statistic(proj model): 1592 on 2 and 3199 DF, p-value: < 2.2e-16

0 个答案:

没有答案