Learn R Programming

setweaver (version 1.0.0)

ce: ce

Description

Computes the conditional entropy \(H(Y \mid X)\) for two binary vectors `y` (outcome) and `x` (predictor).

Usage

ce(y, x)

Value

A numeric scalar giving \(H(Y \mid X)\).

Arguments

y

A binary outcome vector (0/1 or logical). Must be the same length as `x`.

x

A binary predictor vector (0/1 or logical). Must be the same length as `y`.

Examples

Run this code
ce(misimdata$y,misimdata$x1)

Run the code above in your browser using DataLab