From ef5112dada6fd4acc84142c4476d2388ed394114 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 5 Jun 2018 19:24:36 +0200 Subject: [PATCH] update website --- docs/articles/bayesian-statistics.html | 210 ++++++++-------- .../figure-html/unnamed-chunk-6-1.png | Bin 24935 -> 26919 bytes docs/articles/index.html | 5 +- docs/authors.html | 5 +- docs/docsearch.css | 31 +-- docs/docsearch.js | 85 +++++++ docs/index.html | 4 +- docs/pkgdown.css | 5 + docs/pkgdown.js | 232 +++++++----------- docs/pkgdown.yml | 4 +- docs/reference/boot_ci.html | 5 +- docs/reference/bootstrap.html | 15 +- docs/reference/check_assumptions.html | 5 +- docs/reference/chisq_gof.html | 5 +- docs/reference/cod.html | 11 +- docs/reference/converge_ok.html | 10 +- docs/reference/cv.html | 9 +- docs/reference/cv_error.html | 5 +- docs/reference/index.html | 5 +- 19 files changed, 355 insertions(+), 296 deletions(-) create mode 100644 docs/docsearch.js diff --git a/docs/articles/bayesian-statistics.html b/docs/articles/bayesian-statistics.html index 30d43611..c4acdb72 100644 --- a/docs/articles/bayesian-statistics.html +++ b/docs/articles/bayesian-statistics.html @@ -8,8 +8,8 @@ Statistics for Bayesian Models • sjstats - - + + @@ -89,7 +89,7 @@

Statistics for Bayesian Models

Daniel Lüdecke

-

2018-05-24

+

2018-06-05

Source: vignettes/bayesian-statistics.Rmd @@ -170,18 +170,18 @@

#> # Highest Density Interval #> #> HDI(90%) -#> b_jobseek_Intercept [ 3.47 3.88] -#> b_depress2_Intercept [ 1.96 2.45] -#> b_jobseek_treat [-0.01 0.16] +#> b_jobseek_Intercept [ 3.45 3.87] +#> b_depress2_Intercept [ 1.95 2.44] +#> b_jobseek_treat [-0.02 0.15] #> b_jobseek_econ_hard [ 0.01 0.09] #> b_jobseek_sex [-0.09 0.07] #> b_jobseek_age [ 0.00 0.01] -#> b_depress2_treat [-0.11 0.04] -#> b_depress2_job_seek [-0.28 -0.19] +#> b_depress2_treat [-0.11 0.03] +#> b_depress2_job_seek [-0.29 -0.19] #> b_depress2_econ_hard [ 0.12 0.18] #> b_depress2_sex [ 0.04 0.18] #> b_depress2_age [-0.00 0.00] -#> sigma_jobseek [ 0.70 0.76] +#> sigma_jobseek [ 0.70 0.75] #> sigma_depress2 [ 0.59 0.64] hdi(m2, prob = c(.5, .89)) @@ -189,33 +189,33 @@

#> # Highest Density Interval #> #> HDI(50%) HDI(89%) -#> b_jobseek_Intercept [ 3.59 3.75] [ 3.48 3.87] -#> b_depress2_Intercept [ 2.11 2.32] [ 1.97 2.45] -#> b_jobseek_treat [ 0.03 0.10] [-0.02 0.14] +#> b_jobseek_Intercept [ 3.60 3.78] [ 3.47 3.88] +#> b_depress2_Intercept [ 2.10 2.30] [ 1.96 2.43] +#> b_jobseek_treat [ 0.03 0.10] [-0.02 0.15] #> b_jobseek_econ_hard [ 0.03 0.07] [ 0.01 0.09] -#> b_jobseek_sex [-0.04 0.03] [-0.09 0.07] +#> b_jobseek_sex [-0.05 0.02] [-0.09 0.07] #> b_jobseek_age [ 0.00 0.01] [ 0.00 0.01] -#> b_depress2_treat [-0.07 -0.01] [-0.11 0.04] -#> b_depress2_job_seek [-0.26 -0.22] [-0.28 -0.20] -#> b_depress2_econ_hard [ 0.13 0.16] [ 0.12 0.18] -#> b_depress2_sex [ 0.08 0.14] [ 0.04 0.17] +#> b_depress2_treat [-0.06 -0.01] [-0.10 0.03] +#> b_depress2_job_seek [-0.26 -0.22] [-0.29 -0.19] +#> b_depress2_econ_hard [ 0.14 0.16] [ 0.12 0.18] +#> b_depress2_sex [ 0.08 0.14] [ 0.04 0.18] #> b_depress2_age [-0.00 0.00] [-0.00 0.00] #> sigma_jobseek [ 0.71 0.74] [ 0.70 0.75] -#> sigma_depress2 [ 0.60 0.62] [ 0.59 0.64] +#> sigma_depress2 [ 0.61 0.62] [ 0.59 0.64]

For multilevel models, the type-argument defines whether the HDI of fixed, random or all effects are shown.

hdi(m5, type = "random")
 #> 
 #> # Highest Density Interval
 #> 
 #>                              HDI(90%)
-#>  r_e15relat.1.Intercept. [-0.11 1.24]
-#>  r_e15relat.2.Intercept. [-0.12 0.99]
-#>  r_e15relat.3.Intercept. [-0.81 0.74]
-#>  r_e15relat.4.Intercept. [-0.58 0.72]
-#>  r_e15relat.5.Intercept. [-0.98 0.71]
-#>  r_e15relat.6.Intercept. [-1.61 0.27]
-#>  r_e15relat.7.Intercept. [-1.20 0.90]
-#>  r_e15relat.8.Intercept. [-0.84 0.41]
+#> r_e15relat.1.Intercept. [-0.15 1.30] +#> r_e15relat.2.Intercept. [-0.15 1.02] +#> r_e15relat.3.Intercept. [-0.91 0.70] +#> r_e15relat.4.Intercept. [-0.61 0.75] +#> r_e15relat.5.Intercept. [-0.89 0.77] +#> r_e15relat.6.Intercept. [-1.66 0.23] +#> r_e15relat.7.Intercept. [-1.22 0.86] +#> r_e15relat.8.Intercept. [-0.89 0.43]

The computation for the HDI is based on the code from Kruschke 2015, pp. 727f. For default sampling in Stan (4000 samples), the 90% intervals for HDI are more stable than, for instance, 95% intervals. An effective sample size of at least 10.000 is recommended if 95% intervals should be computed (see Kruschke 2015, p. 183ff).

@@ -229,12 +229,12 @@

#> #> inside outside #> b_Intercept 0.0% 100.0% -#> b_e42dep2 43.6% 56.4% -#> b_e42dep3 0.3% 99.7% +#> b_e42dep2 42.9% 57.1% +#> b_e42dep3 0.5% 99.5% #> b_e42dep4 0.0% 100.0% #> b_c12hour 100.0% 0.0% #> b_c172code2 99.5% 0.5% -#> b_c172code3 77.3% 22.7% +#> b_c172code3 78.3% 21.7% #> sigma 0.0% 100.0%

rope() does not suggest limits for the region of practical equivalence and does not tell you how big is practically equivalent to the null value. However, there are suggestions how to choose reasonable limits (see Kruschke 2018), which are implemented in the equi_test() functions.

@@ -253,19 +253,19 @@

#> Samples: 4000 #> #> H0 %inROPE HDI(95%) -#> b_Intercept (*) reject 0.00 [ 7.59 9.89] -#> b_e42dep2 (*) undecided 8.60 [ 0.07 2.05] -#> b_e42dep3 (*) reject 0.00 [ 1.31 3.23] -#> b_e42dep4 (*) reject 0.00 [ 2.81 4.91] +#> b_Intercept (*) reject 0.00 [ 7.51 9.89] +#> b_e42dep2 (*) undecided 8.30 [ 0.09 2.12] +#> b_e42dep3 (*) reject 0.02 [ 1.32 3.32] +#> b_e42dep4 (*) reject 0.00 [ 2.79 4.91] #> b_c12hour accept 100.00 [ 0.00 0.01] -#> b_c172code2 undecided 70.97 [-0.48 0.77] -#> b_c172code3 undecided 21.45 [-0.10 1.42] -#> sigma reject 0.00 [ 3.41 3.76] +#> b_c172code2 undecided 70.83 [-0.44 0.76] +#> b_c172code3 undecided 22.57 [-0.04 1.49] +#> sigma reject 0.00 [ 3.40 3.76] #> #> (*) the number of effective samples may be insufficient for some parameters

For models with binary outcome, there is no concrete way to derive the effect size that defines the ROPE limits. Two examples from Kruschke suggest that a negligible change is about .05 on the logit-scale. In these cases, it is recommended to specify the rope argument, however, if not specified, the ROPE limits are calculated in this way: 0 +/- .1 * sd(intercept) / 4. For all other models, 0 +/- .1 * sd(intercept) is used to determine the ROPE limits. These formulas are based on experience that worked well in real-life situations, but are most likely not generally the best approach.

-

Beside a numerical output, the results can also be plotted, using the plot-argument. In this case, the 95% distributions of the posterior samles are shown, the ROPE is a light-blue shaded region in the plot, and the distributions are colored depending on whether the parameter values are accepted, rejected or undecided.

-
equi_test(m5, plot = TRUE)
+

Beside a numerical output, the results can also be printed as HTML-table or plotted, using the out-argument. For plots, the 95% distributions of the posterior samles are shown, the ROPE is a light-blue shaded region in the plot, and the distributions are colored depending on whether the parameter values are accepted, rejected or undecided.

+
equi_test(m5, out = "plot")

@@ -285,16 +285,16 @@

#> ## Conditional Model: #> #> estimate std.error HDI(89%) neff_ratio Rhat mcse -#> Intercept 1.26 0.75 [-0.28 2.67] 0.17 1.01 0.04 -#> child -1.15 0.09 [-1.29 -0.99] 0.87 1.00 0.00 -#> camper 0.73 0.09 [ 0.58 0.87] 1.00 1.00 0.00 +#> Intercept 1.23 0.75 [-0.27 2.80] 0.17 1 0.04 +#> child -1.15 0.10 [-1.29 -1.00] 1.00 1 0.00 +#> camper 0.73 0.10 [ 0.59 0.89] 1.00 1 0.00 #> #> ## Zero-Inflated Model: #> #> estimate std.error HDI(89%) neff_ratio Rhat mcse -#> Intercept -0.69 0.68 [-2.00 0.47] 0.45 1 0.02 -#> child 1.88 0.33 [ 1.36 2.42] 0.70 1 0.01 -#> camper -0.84 0.37 [-1.41 -0.23] 0.85 1 0.01

+#> Intercept -0.68 0.74 [-1.88 0.55] 0.27 1 0.02 +#> child 1.89 0.33 [ 1.36 2.43] 0.85 1 0.01 +#> camper -0.85 0.34 [-1.42 -0.30] 1.00 1 0.01

Additional statistics in the output are: