returnDeviance {CoCoRaw} | R Documentation |
Returns the test statistics (deviance and F-test statistics) with p-values based on the likelihoods and the dimensions of the two argument models. For discrete models also an adjustment of the degrees of freedom is returned.
returnDeviance(model.1 = "current", model.2 = "base", data = NULL, object = .object.of.models(model.1, model.2, data = data, ...), ...)
model.1 |
See isSubmodel .
|
model.2 |
See isSubmodel . |
data |
See exportCoCo . |
object |
See exportCoCo . |
... |
Additional arguments to generate the CoCo object
from the data argument. See propertyModel . |
A labeled vector of reals.
A vector of zeros is returned if an error occurs.
returnTest
will return NULL
if the models are not available or nested.
Jens Henrik Badsberg
Badsberg, J.H.: A guide to CoCo, JSS, 2001 ( http://www.jstatsoft.org/v06/i04/ ) and Badsberg, J.H.: Xlisp+CoCo, Aalborg University, 1996.
enterModel
, makeModel
,
showModel
, makeCurrent
,
returnModel
, returnModelNumber
,
partialAssociations
, optionsCoCo
,
showTest
, showDeviance
,
returnTest
,
backward
and forward
.
library(CoCoCg); data(Rats); CoCoObject <- makeCoCoCg(); enterDataFrame(Rats, object = CoCoObject); fullModel <- makeModel(enterModel("*", object = CoCoObject)); # ( Should be replaced by calculation of the tests of David Edwards book. ) # Generate some models, here by "backward": backward(recursive = TRUE, headlong = TRUE, coherent = TRUE, follow = TRUE, object = CoCoObject); # Show the model list: showModel("all", object = CoCoObject); returnDeviance("last", 1, object = CoCoObject); homogeneModel <- makeModel(enterModel("[[ab]] / [[aby][abx]] / [[x^][abxy][y^]]", object = CoCoObject)); returnDeviance("last", 1, object = CoCoObject); endCoCo(object = CoCoObject);