如何在面板数据中替换缺失值?
我正在研究每周的收入数据,在该数据中,我将数据定义为学前收入的数据和流行后收益数据。现在,对于某些人来说,我想用他们的大流行前的收入来代替大流行时期的一些缺少价值。但是,我正在为此面板数据编码苦苦挣扎。我希望有人可以帮助我。提前致谢。
I am looking into weekly earnings data, where I have defined my data as pre-pandemic earning data and post-pandemic earning data. Now for some individuals, I have some missing values for the post-pandemic period which I want to replace with their pre-pandemic earnings. However, I am struggling with the coding for this panel data. I was hoping someone could help me with. Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
如果您共享示例数据(请参阅
dataEx
),或者至少列出您拥有的变量总是更容易的。因此,下面的示例很可能需要进行编辑。这假设所有个人确实在每个时间段内都表示,并且您的数据集中有一个唯一的ID变量(
ID
)。It is always easier if you share example data (see
dataex
) or at least list what variables you have. The example below will therefore most likely need to be edited.This assumes that all individuals are indeed represented in each time period and that you have a unique id variable (
id
) in your data set.