Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary method incorrectly labels networks "Gaussian" #50

Open
SachaEpskamp opened this issue Jul 30, 2024 · 0 comments
Open

Summary method incorrectly labels networks "Gaussian" #50

SachaEpskamp opened this issue Jul 30, 2024 · 0 comments

Comments

@SachaEpskamp
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant