Description Usage Arguments Details Examples
Bayesian information criterion (BIC) for the fit of a blm
object.
1 |
object |
a |
... |
other arguments (currently ignored). |
Bayesian information criterion (BIC) of the blm
object.
BIC = n * ln(RSS/n) + k * ln(n). Where n is the number of
observations, k is the number of free parameters to be estimated and RSS is
the residuals sum of squares (ie the deviance
). When
comparing 2 models the strength of the evidence against the model with the
higher BIC value can be summarized as follows according to Wikipedia
(https://en.wikipedia.org/wiki/Bayesian_information_criterion):
ΔBIC | Evidence against higher BIC |
0-2 | Not worth more than a bare mention |
2-6 | Positive |
6-10 | Strong |
>10 | Very Strong |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | set.seed(1)
x <- seq(-10,10,.1)
b <- 0.3
w0 <- 0.2 ; w1 <- 3 ; w2 <- 10
y <- rnorm(201, mean = w0 + w1 * x + w2 *sin(x), sd = sqrt(1/b))
mod1 <- blm(y ~ x + sin(x))
## Not run:
plot(mod1, xlim=c(-10,10))
## End(Not run)
bic(mod1) ## 224.351
#another mod removing the sinus term, clearly less well fitting
mod2 <- blm(y ~ x)
bic(mod2) ## 805.5729 -> huge difference in bic
##much less distinguished model
b <- 0.003
y <- rnorm(201, mean = w0 + w1 * x + w2 *sin(x), sd = sqrt(1/b))
mod1 <- blm(y ~ x + sin(x))
## Not run:
plot(mod1, xlim=c(-10,10))
## End(Not run)
mod2 <- blm(y ~ x)
bic(mod1) #1209.717
bic(mod2) #1215.66 ... still positive support but not strong
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.