识别面板数据模型(stata)中观察很少的群体
如何识别面板数据模型中观测值很少的组?
我使用 xtlogit 估计了几个随机效应模型。平均每组有 26 个观测值,但有些组只记录 1 个观测值。我想识别它们并将它们从模型中排除......有什么建议吗? 我的面板数据是使用以下方式设置的:xtset Countrycode Year
How can I identify groups with few observations in panel-data models?
I estimated using xtlogit several random effects models. On average I have 26 obs per group but some groups only record 1 observation. I want to identify them and exclude them from the models... any suggestion how?
My panel data is set using: xtset countrycode year
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您的足够大面板的神奇数字是 7,并且您适合第一个模型。
然后为您提供可用和可使用的观测值的计数,之后您对后续模型的标准是
if n_used >= 7
您可以直接
不管模型拟合如何。
差异有两个:
最后一个语句将忽略模型拟合中使用的变量中的任何缺失值。
如果您还使用
if
和/或in
将模型拟合限制为特定的观测子集,则e(sample)
知道那样,但最后一条语句没有。Let's suppose your magic number for a big enough panel is 7 and that you fit a first model.
then gives you a count of how many observations were available and can be used, after which your criterion for a later model is
if n_used >= 7
You could just go
regardless of a model fit.
The differences are two-fold:
That last statement would disregard any missing values in the variables used in a model fit.
If you also used
if
and/orin
to restrict model fit to particular subsets of observations, thene(sample)
knows about that, but the last statement does not.