void DynamicInterceptTestFramework::Check() {
   state_modules().Check();
   EXPECT_GT(var(sigma_obs_draws_), 0.0)
       << "sigma_obs_draws has zero variance.";
   EXPECT_TRUE(CheckMcmcVector(sigma_obs_draws_, observation_sd_,
                               .95, "sigma-obs.txt"))
       << AsciiDistributionCompare(sigma_obs_draws_, observation_sd_);
           
   auto status = CheckMcmcMatrix(coefficient_draws_, true_beta_,
                                 .95, true, "beta.txt");
   EXPECT_TRUE(status.ok) << "Coefficients did not cover" << status;
 }
示例#2
0
    void LocalLinearTrendModule::Check() {
      auto status = CheckMcmcMatrix(
          trend_draws_, trend_, .95, true, "trend.txt");
      EXPECT_TRUE(status.ok)
          <<  "Local linear trend failed to cover." << std::endl
          << status;

      EXPECT_GT(var(sigma_level_draws_), 0)
          << "sigma level draws had zero variance";
      EXPECT_TRUE(CheckMcmcVector(sigma_level_draws_, level_sd_, .95,
                                  "sigma-level.txt"))
          << "Innovation SD for local linear trend model, level component "
          << "did not cover true value." << std::endl
          << AsciiDistributionCompare(sigma_level_draws_, level_sd_);

      EXPECT_GT(var(sigma_slope_draws_), 0)
          << "sigma slop draws had zero variance";
      EXPECT_TRUE(CheckMcmcVector(sigma_slope_draws_, slope_sd_, .95,
                                  "sigma-slope.txt"))
          << "Innovation SD for the slope portion of the local linear trend "
          << "model did not cover true value." << std::endl
          << AsciiDistributionCompare(sigma_slope_draws_, slope_sd_);
    }