GithubHelp home page GithubHelp logo

Comments (2)

SachaEpskamp avatar SachaEpskamp commented on May 28, 2024

The example codes in ?netSimulator work fine for me. Can you give a reproducible example?

Best, Sacha

from bootnet.

mjbsp avatar mjbsp commented on May 28, 2024

Thanks Sacha,

The code that I included in the original post reproduces the problem on my computer.

# R version 3.5.1 (2018-07-02) -- "Feather Spray"
# Platform: x86_64-apple-darwin15.6.0 (64-bit)
install.packages("bootnet")
library(bootnet)
# This is bootnet 1.1.0
netSimulator()
netSimulator(nCores = 2)

The code from ?netSimulator also gives me the same error as the prior code. Specifically, the following code gives the error

library("psych")
data(bfi)
bfiData <- bfi[,1:25]

# Estimate a network structure, with parameters refitted without LASSO regularization:
library("qgraph")
Network <- EBICglasso(cor_auto(bfiData), nrow(bfiData), refit = TRUE)

# Simulate 100 repititions in 2 cores under different sampling levels:
Sim1 <- netSimulator(Network,
                     default = "EBICglasso",
                     nCases = c(100,250,500),
                     nReps = 100,
                     nCores = 2)

However, when I remove nCores = 2, the code works fine

# Simulate 100 repititions under different sampling levels without specifying cores (1 core):
Sim2 <- netSimulator(Network,
                     default = "EBICglasso",
                     nCases = c(100,250,500),
                     nReps = 100)

I have now been able to try all of this code on a Windows machine and it works on this other machine using the same version of R and bootnet. So, I recognize that this might be something wrong with my machine. I tried updating my version of R, but the problem persists. I've tried updating packages and the problem persists.

I don't expect you to do individual tech support for my wayward machine, but if you have any ideas let me know. Otherwise, I'll just be patient and use the code on the machine where it works.

from bootnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.