Description Usage Arguments Details Value Author(s) See Also Examples
Performs a test of addition of an edge to a graphical model (an
iModel
object).
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; that is to CItable and CImvn |
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
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 33 34 | ## ## ## testadd
## ## ##
## ## Discrete model
## ##
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 model
## ##
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.