cellCounts {mimR} | R Documentation |
These functions provide a way of specifying a contingency table by a vector of counts and for specifying the sufficient statistics for a covariance selection model as a covariance matrix.
cellCounts(varNames, nLevels = NULL, valueLabels = NULL, observations) empCov(S, counts = NULL, sd = NULL, mean = rep(0, ncol(S)))
varNames |
~~Describe varNames here~~ |
nLevels |
~~Describe nLevels here~~ |
valueLabels |
~~Describe valueLabels here~~ |
observations |
~~Describe observations here~~ |
S |
~~Describe S here~~ |
counts |
~~Describe counts here~~ |
sd |
~~Describe sd here~~ |
mean |
~~Describe mean here~~ |
~~ If necessary, more details than the description above ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
Before using mimR, make sure that the MIM program is runnning.
Søren Højsgaard, sorenh@agrsci.dk
David Edwards, An Introduction to Graphical Modelling, Springer Verlag, 2002
~~objects to See Also as help
, ~~~
x <- cellCounts(varNames=c("aa","bb"), valueLabels=list(aa=c("a1","a2"), bb=c("b100","b200")), observations=c(1,2,3,4)) as.gmData(x) S <- structure(c(305.77, 127.22, 101.58, 106.27, 117.4, 127.22, 172.84, 85.16, 94.67, 99.01, 101.58, 85.16, 112.89, 112.11, 121.87, 106.27, 94.67, 112.11, 220.38, 155.54, 117.4, 99.01, 121.87, 155.54, 297.76), .Dim = c(5L, 5L), .Dimnames = list(c("me", "ve", "al", "an", "st"), c("me", "ve", "al", "an", "st"))) x <- empCov (S,88) as.gmData(x)