Description Usage Arguments Details Value Examples
Anova F-test for comparison of the fits of 2 blm
objects.
1 2 |
model1 |
first, more simple, |
model2 |
second, more complex, |
... |
other arguments (currently ignored). |
Extracts relevant features and compute the F value and the p-value for comparison 2 model fits.
Analysis of Variance Table as for anova.lm
.
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 | 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)
#another mod removing the sinus term, clearly less well fitting
mod2 <- blm(y ~ x)
anova(mod1, mod2)
##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)
anova(mod1, mod2) #... still very low p-value !?
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.