GithubHelp home page GithubHelp logo

Comments (3)

SachaEpskamp avatar SachaEpskamp commented on June 26, 2024

While the original sample has 43 cases, the bootstrapped samples will have fewer than 43 cases leading to potentially non-positive definite correlation matrices used as input. While technically EBICglasso can still be used (you would have to overwrite this error both in qgraph and bootnet) I really do not advice you to do so. See here for more info:

#126

from bootnet.

stonelight816 avatar stonelight816 commented on June 26, 2024

Hi Sacha,

thanks for your response. In this example:#126, the number of datapoints was fewer than number of nodes. In my project, number of datapoints (43) beyonds the number of nodes (37). Why would this error still happened?

from bootnet.

SachaEpskamp avatar SachaEpskamp commented on June 26, 2024

Even though you have more datapoints than nodes in the original data, you don't have this in the bootstrapped data as you resample cases with replacement, leading to less unique cases. See for example:


# Original data with N = 11; P = 10:
data <- matrix(rnorm(11*10),11,10)
all(eigen(cor(data))$values > 0)
# Is positive definite

# Bootstrap sample:
set.seed(42)
bootdata <- data[sample(1:nrow(data),nrow(data),TRUE),]
all(eigen(cor(bootdata))$values > 0)
# No longer positive definite

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.