Skip to content

Summary method incorrectly labels networks "Gaussian" #50

@SachaEpskamp

Description

@SachaEpskamp

It seems that in the summary method any NCT call that did not specify binary.data leads to a header stating the network is Gaussian:

if(object$info$call$binary.data){
data_type <- "BINARY"
} else {
data_type <- "GAUSSIAN"
}

This will lead to unexpected behavior when using the package in combination with bootnet:

# Load data:
library("psychonetrics")
data("Jonas")

# Make binary:
JonasBinary <- Jonas[,1:10]
JonasBinary[JonasBinary==-1] <- 0

# Make groups:
Jonas1 <- JonasBinary[Jonas$familiar == "I know Jonas (very) well!",]
Jonas2 <- JonasBinary[Jonas$familiar != "I know Jonas (very) well!",]

# Fit bootnet:
library("bootnet")
net1 <- estimateNetwork(Jonas1, default = "IsingFit")
net2 <- estimateNetwork(Jonas2, default = "IsingFit")

# Run NCT:
library("NetworkComparisonTest")
nct <- NCT(net1, net2)

# Print summary:
summary(nct)

States GAUSSIAN NETWORK COMPARISON even though the networks are Ising models. I'd just remove the data type in this header.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions