如何消除与R中的时间序列不匹配的横截面数据

问题描述

对于R中的随机效应模型,我具有以下数据框,日期的格式为year-month-day:

const listofThings = ({ things,setThings }) => {
  const onUpdate = React.useCallback(
    (thing) => {
      setThings((prevThings) =>
        prevThings.map((t) => (t.id === thing.id ? thing : t))
      );
    },[setThings]
  );
  return (
    <table>
      <tbody>
        {things.map((thing) => (
          <ThingRow key={thing.id} thing={thing} onUpdate={onUpdate} />
        ))}
      </tbody>
    </table>
  );
};

要使模型起作用,我需要所有国家/地区都具有相同的时间序列,并且要使其连续。在这种情况下,我希望所有国家/地区都具有与B相同的数据系列,因此我需要修整A并删除C。(对于在给定间隔内不连续的时间序列,解决方案是丢弃所有数据) / p>

我完全迷路了,没人知道如何快速解决这个问题。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)