MIMgmData {mimR} | R Documentation |
Different methods for creation of gmData objects. Depending on taste gmData can be taken as meaning 'graphical model data' or 'graphical meta data'
gmData(name, factor = rep(FALSE, length(name)), vallabels=NULL) as.gmData (data) description(x) "description<-"(tmp, value) latent(x) "latent<-"(tmp, value) vallabels(x) "vallabels<-"(tmp, value) observations(x) "observations<-"(tmp, value) "ordinal<-"(tmp, value) ordinal(x) "nominal<-"(tmp, value) nominal(x)
name |
~~Describe name here~~ |
factor |
~~Describe factor here~~ |
data |
a dataframe |
x |
A gmData object |
tmp |
A gmData object |
value |
The value to entered into the object |
vallabels |
A list containing labels of the levels of the discrete variables (not currently used) |
A variety of data formats can be turned into gmData objects. See examples.
A dataframe containing the link between the names in the dataframe and the names (and labels) and the coding of factors in MIM
If only a subset of a dataframe is used, then it may be necessary to recode the levels of factors in the dataframe. Otherwise one can end up with slices of the table in MIM with no observations in it. The easiest way to recode the levels is to use the function 'factor()', see examples below.
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, Second Edition, Springer Verlag, 2000