我正在使用仪器运行feglm回归,并得到以下错误
Error in feglm(total_crimes ~ rh + temp | station + hour + weekday + month_year_station | :
The left hand side (total_crimes ~ rh + temp | station + hour + weekday + month_year_station | pm25_n) is not numeric. The class formula is not supported.我使用的公式如下:
feglm(Dependent ~ exog_1 + exog_2 |fe_1 + fe_2| endog_1 ~ IV , data = y, family = "poisson")当然,我反复检查了我的内源性变量和IV变量是否是数字变量。
用于复制错误的:在试图运行一个简单的IV时,该包附带的贸易数据集也会发生相同的错误,如:
feols(Euros ~ 1 | dist_km ~ product, data = trade)发布于 2021-01-27 23:12:22
实际上,工具变量只用于OLS,而非非线性模型.所以,不幸的是,这是无法避免的。
请注意,错误是:
fepois(Euros ~ 1 | dist_km ~ Product, data = trade)
#> Error in fepois(Euros ~ 1 | dist_km ~ Product, data = trade) :
#> The RHS of the formula must represent the fixed-effects (and can't be equal to
#> a formula: only feols supports this).GLM模型不接受IVs的事实在错误消息中的括号中说明了(尽管消息可能更清楚)。
https://stackoverflow.com/questions/65867315
复制相似问题