Learn R Programming

bnlearn (version 4.1)

lizards: Lizards' perching behaviour data set

Description

Real-world data set about the perching behaviour of two species of lizards in the South Bimini island, from Shoener (1968).

Usage

data(lizards)

Arguments

Format

The lizards data set contains the following variables:
  • Species (the species of the lizard): a two-level factor with levels Sagrei and Distichus.
  • Height (perch height): a two-level factor with levels high (greater than 4.75 feet) and low (lesser or equal to 4.75 feet).
  • Diameter (perch diameter): a two-level factor with levels narrow (greater than 4 inches) and wide (lesser or equal to 4 inches).

Examples

Run this code

# load the data and build the correct network from the model string.
data(lizards)
res = empty.graph(names(lizards))
modelstring(res) = "[Species][Diameter|Species][Height|Species]"
plot(res)
table(lizards[, c(3,2,1)])

## Not run: ------------------------------------
# # This data set is useful as it offers nominal values for
# # the conditional mutual information and X^2 tests.
# ci.test("Height", "Diameter", "Species", test = "mi", data = lizards)
# ci.test("Height", "Diameter", "Species", test = "x2", data = lizards)
## ---------------------------------------------

Run the code above in your browser using DataLab