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
[F] Add SIMETA functionality #53
Comments
@Eliford I just checked this into development version. It's working on some basic tests right now ... but still pretty new to me too: no documentation and I don't know if or where it could break. Also the interface could change .... but I'll be sure to keep you in the loop if you want to kick this around. This is purely exploratory right now ... but if you want to help test, please take crack. The important points are:
library(dplyr)
library(magrittr)
library(rbenchmark)
library(mrgsolve)
code <- '
$INCLUDE SIMETA
$PARAM BASE = 20
$CMT GUT CENT
$MAIN
CENT_0 = BASE;
double x = 0;
double y = 0;
double z = 0;
unsigned int i = 0;
if(NEWIND <= 1) {
z = 10;
// The ETA before SIMETA
x = ETA(1);
SIMETA;
// The ETA after SIMETA
y = ETA(1);
// z should be between -1.5 and 1.5
z = 10;
i = 0;
while(fabs(z) > 1.5 && i < 100) {
SIMETA;
z = ETA(2);
i++;
}
}
$OMEGA
1 1 1
$TABLE
table(x) = x;
table(y) = y;
table(z) = z;
table(zz) = ETA(3);
'
mod <- mcode("simeta", code,warn=FALSE)
system.time(out <- mod %>% req() %>% mrgsim(nid=50000, end=-1))
out
out %>% as.tbl %>% distinct(ID) %>% summary
|
Thank you very much for working on this. I will use the development version now. I will post any issue I encounter. |
@Eliford My apologies if you're already using the simeta stuff. There was a change in the interface in the current development version. You can see an example here: I've been refining this over the past week and feel better about the long-term prospects for this sort of setup. Hopefully there will be more advanced features available from the same / consistent interface now. And I'm more confident now that the interface will look something like this going forward. If you're already using, let me know if you need help with the new interface. I wrote the vignette to help explain some stuff. Eventually there will be better documentation in the |
Thank you for improving the SIMETA functionality (now with plugin). It is more user friendly. However,I am yet to start using it. |
@kylebmetrum: This is just a feedback. SIMETA plugin is working great for me. I started using it over the weekend and I get what I expect. |
In response to @Eliford question.
This isn't it ...but sketching out how we could use
$INCLUDE
type capability to do this.RcppArmadillo
andmrgsolve
MVNORM
plugin ... similar function that mrgsolve uses, but for now just draws one vector from multivariate normal$INCLUDE
so that, whenRcpp
andRcppArmadillo
are included, we only includeRcppArmadillo
OMEGA
matrix to$MAIN
.The text was updated successfully, but these errors were encountered: