-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Visual Predictive Check #66
Comments
@wds15 are you aware of https://github.com/ronkeizer/vpc |
Don't know about @wds15, but I hadn't seen that package. Thanks.
Although the vpc suggested here seems easy enough to add, so we might as
well do our own version to maintain a consistent style across plot types
and also limit dependencies. Especially since one of the goals for
bayesplot is to allow other packages to call it in order to not have to
use different packages and styles for each kind of plot.
|
yeah, the basic functionality is really easy to implement, and could be nice stylistically. The 3 'extras' this package offers are:
Happy to answer any questions, or help in some capacity. I think a 'built-in' VPC would be a valuable addition, and is a go-to plot in the pharmacometrics community. |
Cool, thanks. I don't do much pharma stuff so it will definitely be good to
get some feedback on the plots when I have a chance to add it to a branch.
…On Thu, Jan 26, 2017 at 9:33 PM Devin Pastoor ***@***.***> wrote:
yeah, the basic functionality is really easy to implement, and could be
nice stylistically.
The 3 'extras' this package offers are:
- binning for non-uniform/nominal sampling times
- prediction corrections - useful when data has wide range, eg
ascending dose studies (more details here:
https://www.ncbi.nlm.nih.gov/pubmed/21302010)
- VPC's for categorical data
Happy to answer any questions, or help in some capacity. I think a
'built-in' VPC would be a valuable addition, and is a go-to plot in the
pharmacometrics community.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHb4Qz5AKZ3iUBhSrL62U475C49Xohr1ks5rWVdtgaJpZM4Lu4NM>
.
|
@dpastoor no, I don't know that package, looks interesting. However, having this plot in bayesplot would be great for the reasons Jonah raises. The plot is one of the standards in PK/PD modeling. However, I think this is useful elsewhere certainly. Given with what is there in bayesplot it should be straightforward; at least it looks like. I am happy to review the feature branch (or even write one should I think adapting code from other plotting functions looks easily adaptable to me in a coherent design). |
@wds15 In the example you sent which parts of the data processing (e.g. binning) do you envision the user performing before calling a bayesplot function? |
Also, we should find a good way to write the code without using the plyr package. dplyr and reshape2 are ok since bayesplot already uses them. |
The user should be doing the binning himself. bayesplot should only need to know what refers to the bins. I suppose this can be mapped to the grouping facilities which are already there. What would be useful is to allow the user to specify extra strata which are used to split things, e.g. by facets. So the bins always define the x-axis and a variable like sex may put male and female subjects on different facets. Let me know if I should look at some branch and try things. |
Ok cool. I think that makes sense. I'll try to put together a prototype soon. |
It would be great to have a so-called visual predictive check. To exemplify it I include an example in the form of a simple R script.
This plot is very useful for models which have continuous regressors which are given by the design of the experiemnt at the same value for all the subjects in a data-set. For example, imagine I have many subjects in a clinical study and one measures at pre-defined time-points for all patients whatever is of interest. The plot then allows to compare the raw quantiles of the data at each time-point vs what the model predicts for these quantiles (with its uncertainty).
vpc_example_R.txt
vpc_mtcars.pdf
The text was updated successfully, but these errors were encountered: