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

problem occurs when set estimator = 'mgm' #51

Open
Daiyan-project opened this issue Sep 5, 2024 · 0 comments
Open

problem occurs when set estimator = 'mgm' #51

Daiyan-project opened this issue Sep 5, 2024 · 0 comments

Comments

@Daiyan-project
Copy link

Daiyan-project commented Sep 5, 2024

Hi,

I want to compare network with the setting of mgm. I don't know if it is right because I didn't find the option about parameter 'estimator'.

This is the code of a easy example:
library(NetworkComparisonTest)
library(mgm)

set.seed(123)
data1_test <- matrix(rnorm(1005), ncol=5)
data2_test <- matrix(rnorm(100
5), ncol=5)

data1_test <- as.matrix(data1_test)
data2_test <- as.matrix(data2_test)

nct_result_mgm <- NetworkComparisonTest::NCT(data1_test, data2_test,
it = 1000,
estimator = "mgm",
estimatorArgs = list(type = rep("g", ncol(data1_test)),
level = rep(1, ncol(data1_test)))
)

This is the error:
|----------------------------------------------------------------------------------------| 100%
|----------------------------------------------------------------------------------------| 100%
Note that the sign of parameter estimates is stored separately; see ?mgmError in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
'data' must be of a vector type, was 'NULL'

Anyway, thanks for your kindly help.

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