returnTable {CoCoRaw} | R Documentation |
Return the observed probabilities, counts, means, covariance matrix, canonical parameters, fitted values, residuals, etc. of marginal tables.
returnTable(type = "observed", set = "*", model = FALSE, random = FALSE, log.transformed = FALSE, complete = FALSE, discrete.ordered = TRUE, dump = FALSE, label = TRUE, split = TRUE, discrete.outer = TRUE, mixed = FALSE, data = NULL, object = .object.of.model(model, data = data, ...), ...)
type |
See also showTable .
For set with only discrete variables
the type "sparse.table" is avaliable
to return the cells of the table with count different
from zero.
For set with both discrete and continuous variables
the argument type should be
"canonical" ,
"moment" ,
"raw" ,
"mk" ,
or, "ms" .
|
set |
See showTable . |
model |
See returnModel . |
random |
See showTable . |
log.transformed |
See showTable . |
complete |
See showTable . |
discrete.ordered |
See showTable . |
dump |
Logical. For set with only discrete variables.
If dump is TRUE and dump of
optionsCoCo also is TRUE
then the table is written to the dump file. |
label |
Logical, if label then labels
are set on returned arrays. |
split |
Logical, for the argument type
with both discrete and continuous variables:
If split is TRUE then
the returned quantities are split
into the three parts
discrete, linear and quadratic. |
discrete.outer |
Logical, for the argument type
with both discrete and continuous variables:
If discrete.outer is FALSE then
order of the discrete and the continuous
variables are permuted. |
mixed |
See showTable . |
data |
See exportCoCo . |
object |
See exportCoCo . |
... |
Additional arguments to generate the CoCo object
from the data argument. See propertyModel . |
TRUE
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.
library(CoCoCg); data(fev); fevCoCo <- makeCoCoCg(); result <- enterDataFrame(fev, object = fevCoCo); enterModel("*;", object = fevCoCo); showTable("observed", ":Sex:Smoker", object = fevCoCo); showTable("canonical", ":Sex:Smoker:Age:FEV:Height", table = TRUE, object = fevCoCo); showTable("canonical", ":Sex:Smoker:Age:FEV:Height", matrix = TRUE, object = fevCoCo); showTable("canonical", ":Age:FEV:Height", matrix = TRUE, object = fevCoCo); c1 <- returnTable("canonical", ":Sex:Smoker:Age:FEV:Height", label = FALSE, split = FALSE, object = fevCoCo); c2 <- returnTable("canonical", ":Sex:Smoker:Age:FEV:Height", label = TRUE, object = fevCoCo); c3 <- returnTable("canonical", ":Sex:Smoker:Age:FEV:Height", label = TRUE, split = FALSE, object = fevCoCo); c4 <- returnTable("canonical", ":Sex:Smoker:Age:FEV:Height", label = TRUE, split = FALSE, discrete.outer = TRUE, object = fevCoCo); returnTable("canonical", ":Sex:Smoker:Age:FEV:Height", label = TRUE); returnTable("moment", ":Sex:Smoker:Age:Height", label = TRUE)$Mean; returnTable("moment", ":Smoker:Age:Height", label = TRUE)$Mean; returnTable("moment", ":Sex:Age:Height", label = TRUE)$Mean; c4[,,1] c4[1,1,] c5 <- returnTable("canonical", ":Sex:Smoker:Age:FEV:Height", label = TRUE, split = TRUE, discrete.outer = FALSE, object = fevCoCo); c6 <- returnTable("canonical", ":Sex:Smoker:Age:FEV:Height", label = TRUE, split = TRUE, discrete.outer = TRUE, object = fevCoCo); showTable("moment", ":Sex:Smoker:Age:FEV:Height", matrix = TRUE, object = fevCoCo); m1 <- returnTable("moment", ":Sex:Smoker:Age:FEV:Height", label = FALSE, split = FALSE, object = fevCoCo); m2 <- returnTable("moment", ":Sex:Smoker:Age:FEV:Height", label = TRUE, object = fevCoCo); m3 <- returnTable("moment", ":Sex:Smoker:Age:FEV:Height", label = TRUE, split = FALSE, object = fevCoCo); m4 <- returnTable("moment", ":Sex:Smoker:Age:FEV:Height", label = TRUE, split = FALSE, discrete.outer = TRUE, object = fevCoCo); m4[,,1] m4[1,1,] m5 <- returnTable("moment", ":Sex:Smoker:Age:FEV:Height", label = TRUE, split = TRUE, discrete.outer = FALSE, object = fevCoCo); m6 <- returnTable("moment", ":Sex:Smoker:Age:FEV:Height", label = TRUE, split = TRUE, discrete.outer = TRUE, object = fevCoCo); endCoCo(object = fevCoCo);