gmData: Class "gmData" graphical meta data
Description
A common class for representing data. No matter the actual
representation of data, the important characteristics are contained in
a graphical metadata object.Usage
newgmData(varNames,
varTypes=rep(validVarTypes()[1],length(varNames)),
nLevels=NA,
latent=NA,
valueLabels=NULL,
observations=NULL,
description=NA,
shortNames=c(letters,LETTERS)
)
Arguments
varNames
a vector of strings with names of variables.
varTypes
a vector of strings with values from
validVarTypes
giving the types of the variables. nLevels
a numeric vector with integer values for discrete or
ordinal variables giving the number of levels.
latent
a vector of strings with names of the latent variables.
valueLabels
a list of vectors of strings with names of the
levels for each discrete or ordinal variable.
observations
an object containing the observations, eg. a
dataframe or a table.
description
a string describing the origin of the data.
shortNames
a vector of strings giving a short name of each
variable.
Value
- An object of class
gmData
holds information about the data
and can be retrieved and changed by accessor functions.
Objects from the Class
Objects can be created by calls of the form newgmData(
varNames, varTypes, nLevels, latent, valueLabels,
observations, description)
. More often, gmData objects will be
created from a data.frame or table.
A gmData
object contains the abstraction of data into a
meta data object including variable names and types etc. However, the
actual data might not be present or may be represented by a reference
to data, such as a database file. Also, it may be possible to work
without data, which may be valuable if the point of interest is in the
model alone. Separating the specification of the
variables from data has the benefit, that some properties of a model can be
investigated without any reference to data, for example
decomposability and collapsibility.