graphmod {logilasso}R Documentation

Function to plot a graphical model.

Description

Function to plot a graphical model for objects of class predlogilasso, cvlogilasso and levellogilasso. For details about graphical models, see reference.

Usage

graphmod(obj, grenze = 0, nnames = NULL, ...)

## S3 method for class 'predlogilasso':
graphmod(obj, grenze = 0, nnames = NULL,... )

## S3 method for class 'cvlogilasso':
graphmod(obj, grenze=0, nnames = NULL, lambda = NULL, ... )
## S3 method for class 'levellogilasso':
graphmod(obj, grenze=0, nnames = NULL, lambda = NULL, to.which.int = NULL, ... )

Arguments

obj Object of class predlogilasso, cvlogilasso or levellogilasso.
grenze Components of beta which are smaller than grenze times the biggest component of beta are truncated to zero.
nnames Character vector. Names of the nodes in the graphical model.
lambda For object of class cvlogilasso or levellogilasso: Should not be specified except if the graphical model for a specific value of lambda should be drawn. Otherwise this value is assessed by cross-validation.
to.which.int For objects of class levellogilasso: Should not be specified except if the graphical model for a specific interaction number is desired. Otherwise assessed by cross-validation.
... Additional arguments to be passed to the plotting function.

References

Steffen L. Lauritzen, Graphical Models, Oxford University Press, 1996

Examples

library(gRbase)
data(reinis)

fit <- logilasso(reinis,lambdainit=1)
pred <- predict(fit,lambda=0.5)
# Graphical model of an object of class predlogilasso
graphmod(pred,nnames=as.character(c(1:6)))

fit <- logilasso(reinis,lambdainit=1,cvfold=3)
# Graphical model of an object of class cvlogilasso
graphmod(fit,nnames=c("one","two","three","four","five","six"))

[Package logilasso version 0.1.0 Index]