gm.analysis {gmvalid}R Documentation

Graphical model analysis

Description

Graphical model selection by different selection strategies. The selected graph is plotted where line thickness corresponds to an optional edge measure.

Usage

gm.analysis(data, edge.measure = c("gamma.cond", "marg.gamma", "cor", "boot",
            "cov"), strategy = c("backwards", "forwards", "eh"), 
            plot.significant = TRUE, boot.N = 100, ...)

Arguments

data Data frame or array. Variables need to be discrete and should have names.
edge.measure One of "gamma.cond", "marg.gamma", "cor", "boot", "cov". To be plotted in the graph. May be abbreviated. See details.
strategy See gm.coco.
plot.significant If TRUE only significant edges in the selected models are plotted (in solid lines). If FALSE also not significant edges are plotted as dashed lines.
boot.N Only required if edge.measure is "boot". Specifies the number of bootstrap replications.
... Further options of gm.coco can be given.

Details

Different edge measures:
"gamma.cond" - Conditional gamma coefficient, calls gm.gamma with type = conditional.
"marg.gamma" - Marginal gamma coefficient, calls gm.gamma with type = marginal.
"cor" - Pearson's correlation coefficient, calls cor.
"boot" - calls gm.boot.coco. boot.N bootstrap replications will be done. Plots the relative edge frequency.
"cov" - Pearson's covariance, calls cov.

Value

A list containing:

"strategy" One of "backwards","forwards" and "eh".
"model" String vector of the accepted and plotted models.
"edge.measure" Character string indicating what type of edge measure was performed.
"analysis" Upper-tri matrix of the respective edge measures.
"variable names" Matrix that assigns a letter to each variable that is used in the model formulas.

Author(s)

Fabian Sobotka, Marc Suling, Ronja Foraita
Bremen Institute for Prevention Research and Social Medicine
(BIPS) http://www.bips.uni-bremen.de

See Also

gm.plot, gm.coco

Examples

  data(wam)
  gm.analysis(wam)
  
  ### showing various options in action
  gm.analysis(wam,strategy="f",edge.measure="b",
    boot.N=50,plot.significant=FALSE,recursive=TRUE,follow=TRUE,decomposable.mode=TRUE)

[Package gmvalid version 1.2 Index]