Test addition of edge to graphical model
Performs a test of addition of an edge to a graphical
model (an iModel
object).
testadd(object, edge, k = 2, details = 1, ...)
object |
A model; an object of class |
edge |
An edge; either as a vector or as a right hand sided formula. |
k |
Penalty parameter used when calculating change in AIC |
details |
The amount of details to be printed; 0 surpresses all information |
... |
Further arguments to be passed on to the underlying functions for testing. |
Let M0 be the model and e=u,v be an edge and let M1 be the model obtained by adding e to M0. If M1 is decomposable AND e is contained in one clique C only of M1 then the test is carried out in the C-marginal model. In this case, and if the model is a log-linear model then the degrees of freedom is adjusted for sparsity.
A list
Søren Højsgaard, sorenh@math.aau.dk
## Discrete models data(reinis) ## A decomposable model mf <- ~smoke:phys:mental + smoke:systol:mental object <- dmod(mf, data=reinis) testadd(object, c("systol", "phys")) ## A non-decomposable model mf <- ~smoke:phys + phys:mental + smoke:systol + systol:mental object <- dmod(mf, data=reinis) testadd(object, c("phys", "systol")) ## Continuous models data(math) ## A decomposable model mf <- ~me:ve:al + al:an object <- cmod(mf, data=math) testadd(object, c("me", "an")) ## A non-decomposable model mf <- ~me:ve + ve:al + al:an + an:me object <- cmod(mf, data=math) testadd(object, c("me", "al"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.