Learn R Programming

pcalg (version 2.0-3)

GaussL0penObsScore-class: Class "GaussL0penObsScore"

Description

This class represents a score for causal inference from observational Gaussian data; it is used in the causal inference function ges.

Arguments

encoding

UTF-8

Extends

Class "Score", directly. All reference classes extend and inherit methods from "envRefClass".

Fields

The class GaussL0penObsScore has the same fields as Score. They need not be accessed by the user.

Details

The class implements an $\ell_0$-penalized Gaussian maximum likelihood estimator. The penalization is a constant (specified by the argument lambda in the constructor) times the number of parameters of the DAG model. By default, the constant $\lambda$ is chosen as $\log(n)/2$, which corresponds to the BIC score.

See Also

ges, GaussL0penIntScore, Score

Examples

Run this code
##################################################
## Using Gaussian Data
##################################################
## Load predefined data
data(gmG)

## Define the score object
score <- new("GaussL0penObsScore", gmG$x) 

## Score of the true underlying DAG
score$global.score(as(gmG$g, "GaussParDAG"))

## Score of the DAG that has only one edge from 1 to 2
A <- matrix(0, ncol(gmG$x), ncol(gmG$x))
A[1, 2] <- 1
score$global.score(as(A, "GaussParDAG"))
## (Note: this is lower than the score of the true DAG.)

Run the code above in your browser using DataLab