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

Export mvd.rgen #1

Open
BlackEdder opened this issue Apr 21, 2020 · 0 comments
Open

Export mvd.rgen #1

BlackEdder opened this issue Apr 21, 2020 · 0 comments

Comments

@BlackEdder
Copy link

mvd.rgen is not exported. It can therefore not be used outside the package.

Related to that the function has some errors when using with a gmm fit, because it tries to access fit$k and x is not defined:

The below fixed it for me:

      s <- sample(fit$K, n, replace = T)
      x <- matrix(0, nrow = n, ncol = ncol(fit$centers))
      for (i in 1:n) {
        x[i,] <- mvtnorm::rmvnorm(1, fit$centers[s[i],], fit$covariances[[s[i]]])
      }
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