gm.analysis {gmvalid}R Documentation

Analyze a data set

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 a table (array) with at least 2 denominated variables.
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. The relative edge frequency will be plotted next to it.
"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 with the result of the edge measure values.
"variable names" Matrix that assigns a letter to each variable that is used in the model formulas.

Note

The option boot may take some time depending on the size of boot.N.

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.1 Index]