Learn R Programming

pcalg (version 2.0-3)

GaussL0penIntScore-class: Class "GaussL0penIntScore"

Description

This class represents a score for causal inference from jointly interventional and observational Gaussian data; it is used in the causal inference functions gies and simy.

Arguments

encoding

UTF-8

Extends

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

Fields

The class GaussL0penIntScore 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

gies, simy, GaussL0penObsScore, Score

Examples

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

## Define the score object
score <- new("GaussL0penIntScore", gmInt$x, gmInt$targets, gmInt$target.index) 

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

## Score of the DAG that has only one edge from 1 to 2
A <- matrix(0, ncol(gmInt$x), ncol(gmInt$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