-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add Stan + jmpost examples #251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gowerc , looks good, however I wonder if we could directly have this as a vignette in the package itself? As the design
folder won't be visible for users, and is just for us as developers?
Well thats annoying, despite this PR having 0 code changes on the packages code base the automatic roxygen pipeline has decided to re-write all of the help files due to an updated version of the roxygen package 😢 |
@danielinteractive - At the moment I was thinking this would just be for us (tbh I'm only including it here as an easy way of sharing with @mercifr1 as opposed to sending an email). I didn't feel vignettes for Stan tutorials was particularly useful for our packages end users as my thinking was that our main purpose was to be to abstract away the raw Stan code? |
Code Coverage Summary
Diff against main
Results for commit: 82ba6ce Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Test Performance Difference
Additional test case details
Results for commit 422156f ♻️ This comment has been updated with latest results. |
I think it could be helpful for Stan users to see the analogies. But ok can keep in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much!
|
||
stan_data <- list( | ||
n = nrow(dat), | ||
x = rnorm(50, 5, 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together.
Sorry if I am not using the 'review' feature correcting here - I am using it for the 1st time
May I ask what is 'x' and why is it a vector of length 50?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question....
I think this was just some old code that I forgot to delete, as far as I can see x
isn't used anywhere in the stan program so it is contributing nothing.
Will clean up in a future update as this PR has already been merged
Closes #250
Attempts to address @mercifr1's request to have a working example showing how jmpost code compares to raw Stan code. Note that jmpost has significantly worse performance due to the fact that we calculate the survival function by approximating the integral of the hazard function (as opposed to the raw Stan code here that just uses the closed form of the survival function as this is an OS only model.)