## ## ## 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"))
Run the code above in your browser using DataLab