cellCounts {mimR}R Documentation

Convenience functions for specifying sufficient statistics for purely discrete and purely continuous graphical models

Description

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.

Usage

cellCounts(varNames, nLevels = NULL, valueLabels = NULL, observations)
empCov(S, counts = NULL, sd = NULL, mean = rep(0, ncol(S)))

Arguments

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~~

Details

~~ If necessary, more details than the description above ~~

Value

~Describe the value returned If it is a LIST, use

comp1 Description of 'comp1'
comp2 Description of 'comp2'

...

Note

Before using mimR, make sure that the MIM program is runnning.

Author(s)

Søren Højsgaard, sorenh@agrsci.dk

References

David Edwards, An Introduction to Graphical Modelling, Springer Verlag, 2002

See Also

~~objects to See Also as help, ~~~

Examples

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)
  
  

[Package mimR version 2.6.1 Index]