tests/testthat/data_for_retrieve_tests.R

test_answer_median <-
  structure(c(7.66326915430084, 10.5456377610072, 7.62721910209057, 
              6.15397157549917, 7.39187255777517, 4.81489509942057, 5.82967264983337, 
              10.4250076101431, 8.16827693076258, 6.07598566812009, -18.7547506507413
  ), .Names = c("mu", "theta[1]", "theta[2]", "theta[3]", "theta[4]", 
                "theta[5]", "theta[6]", "theta[7]", "theta[8]", "tau", "log-posterior"
  ))
test_answer_mean <-
  structure(c(7.61278931524295, 11.4016705206937, 7.66568078208364, 
              5.67748189168343, 7.33867075036529, 4.43757702342367, 5.61772900604455, 
              10.9224001073223, 8.35604656671243, 7.32821612535776, -18.3099036670394
  ), .Names = c("mu", "theta[1]", "theta[2]", "theta[3]", "theta[4]", 
                "theta[5]", "theta[6]", "theta[7]", "theta[8]", "tau", "log-posterior"
  ))
test_answer_rhat <-
  structure(c(1.00193274614794, 1.00452938626942, 1.00125455903399, 
              1.00127022064874, 1.00165198336501, 1.00372002563809, 1.00307636169776, 
              1.00300332586848, 1.00086600376535, 1.0135621070749, 1.02233385888746
  ), .Names = c("mu", "theta[1]", "theta[2]", "theta[3]", "theta[4]", 
                "theta[5]", "theta[6]", "theta[7]", "theta[8]", "tau", "log-posterior"
  ))
test_answer_ess <-
  structure(c(695.050921695149, 692.572280147228, 1209.37138131348, 
              1297.32046732778, 1115.68142297175, 866.803880031437, 1008.24598387706, 
              689.500717669359, 1349.69098807226, 271.485295178596, 164.76144165741
  ), .Names = c("mu", "theta[1]", "theta[2]", "theta[3]", "theta[4]", 
                "theta[5]", "theta[6]", "theta[7]", "theta[8]", "tau", "log-posterior"
  ))
test_answer_sd <-
  structure(c(5.26323739262692, 8.69982993302657, 6.52019611729075, 
              8.10150161148801, 6.69543707787934, 6.47930101606355, 6.85333063955901, 
              7.15623795593227, 8.34539836623598, 5.41072834729483, 5.29638545596557
  ), .Names = c("mu", "theta[1]", "theta[2]", "theta[3]", "theta[4]", 
                "theta[5]", "theta[6]", "theta[7]", "theta[8]", "tau", "log-posterior"
  ))
test_answer_accept_stat <-
  structure(c(0.824390178845497, 0.95133395868425, 0.915935600387729, 
              0.920407393897412), .Names = c("chain1", "chain2", "chain3", 
                                             "chain4"))
test_answer_divergent <-
  structure(c(0.006, 0.003, 0, 0.002), .Names = c("chain1", "chain2", 
                                                  "chain3", "chain4"))
test_answer_mcse <-
  structure(c(0.199638660406913, 0.330581244601373, 0.187491168280733, 
              0.224927153813632, 0.200451279211605, 0.220073491463301, 0.215833291826995, 
              0.272531942571016, 0.227158973991041, 0.32838444299762, 0.412621442147415
  ), .Names = c("mu", "theta[1]", "theta[2]", "theta[3]", "theta[4]", 
                "theta[5]", "theta[6]", "theta[7]", "theta[8]", "tau", "log-posterior"))
test_answer_quantiles <-
  structure(c(-2.45077906182123, -3.31983983310261, -4.57962616838214, 
              -12.4578126839486, -6.62936539181392, -9.08938973639197, -8.63855924130489, 
              -1.72877568253281, -8.31237064690878, 1.09201252476925, -27.7751080865317, 
              4.12068194893101, 5.73411025831149, 3.17044970534105, 1.24377962416165, 
              2.97370388347474, 0.237131301746035, 1.41862522514148, 5.98638086164563, 
              3.29894150026978, 3.36183993309446, -21.9839223409667, 7.66326915430084, 
              10.5456377610072, 7.62721910209057, 6.15397157549917, 7.39187255777517, 
              4.81489509942057, 5.82967264983337, 10.4250076101431, 8.16827693076258, 
              6.07598566812009, -18.7547506507413, 10.954089111466, 16.0154148818468, 
              11.8226936192307, 10.783351812759, 11.6861908782556, 9.0714064733997, 
              10.0979677042868, 14.9916757839673, 13.0025275234939, 9.82027519277038, 
              -14.9290381144071, 18.049454172935, 31.9617117712557, 20.8705874040468, 
              20.807183632335, 20.5249077599984, 15.7663003355112, 18.3397826218994, 
              26.8872295016415, 26.4856883459691, 20.7118172250858, -7.05699018362593
  ), .Dim = c(11L, 5L), .Dimnames = list(c("mu", "theta[1]", "theta[2]", 
                                           "theta[3]", "theta[4]", "theta[5]", "theta[6]", "theta[7]", "theta[8]", 
                                           "tau", "log-posterior"), c("2.5%", "25%", "50%", "75%", "97.5%")))
test_answer_stepsize <-
  structure(c(0.265382735953881, 0.0917792726985177, 0.18419718916482, 
              0.110787656205807), .Names = c("chain1", "chain2", "chain3", 
                                             "chain4"))
test_answer_treedepth <-
  structure(c(6, 7, 6, 6), .Names = c("chain1", "chain2", "chain3", 
                                      "chain4"))
stan-dev/shinystan documentation built on Aug. 7, 2022, 3:25 a.m.