Hi Samer,
Sorry to revive and old forum discussion, but does PHX have the capability to simulate categorical events for predictive check in newer builds of PHX?
Hi Samer,
Sorry to revive and old forum discussion, but does PHX have the capability to simulate categorical events for predictive check in newer builds of PHX?
Hello Lance,
I am confirming that the latest version of Phoenix, version 7.0 has categorical event for VPC.
Here is the release note for Phoenix 7.
VPC handles ordered categorical observations (QC 15141): If VPC is requested for a model that contains a multi or ordinal statement, and there are multiple categories, additional VPC plots are generated, one for the probability associated with each category. For example, if the observation is called CAT, having values 0, 1, and 2, then there are plots generated for CAT_0, CAT_1, and CAT_2. These show the predicted and actual probabilities for categories 0, 1, and 2.
Note that for ordered categorical observations, the plot labelled SimQCI, which shows secondary intervals on the predicted quantiles, does not show such intervals, because they are not applicable. It is not possible to suppress the plot entirely because there can be additional Gaussian observations also in the VPC. However, if no secondary intervals are requested, the SimQCI plot is suppressed entirely.
Note that Categorical Data say you have an endpoint that is 0/1/2/ is not the same as time to event.
We can do a kind of VPC i.e simulating time to event depending on whatever model/hazard function you have but we have to write it in LL with the simulate argument telling the software exactly how to simulate.
the short answer is that VPC is not yet automatic for time to event you need to write code.
Bests,
Samer
Hi Samer,
I just want to add that because it is difficult to interpret the VPC of TTE I need to use Kaplan–Meier estimates of the Cox–Snell residuals and its confidence interval.
There is no chance to see survival plots in PHX at all. That’s a pity.
BR,
Mittyright
Dear Mittyright,
We can do the KM plots in R viar Phoenix Connect.
What we need from PML is the simulation file that we can then post process in R.
A general framework to do this is that on you observed data you do the KM estimaotor stratified or not by a covariate outputting the CI ( very easy in R).
Then we repeat the above process for each replicate then we will have say smooth K-M on simulated data from this we can then compute “median” and percentiles that we want to compare to what we computed on the initial observed data.
Bests,
Samer
Dear Samer,
thank you for reply.
You are right, we need R for plotting this.
BTW I need to import the simulated table to the PHX first, because there is no way to use it directly in PHX environment. It is funny that I can do the right click on it and send it to the other PHX object, but cannot see it in the new object created. I think that’s because it is stil in to-do list:-)
As a workaround I’m using ‘copy result files to directory’ in Run Options and then import the simtable in R through connect directly. Are you using more convenient workaround?
I suspect huge performance troubles in simulation tables manipulation if PHX continues to use csv format for simulation tables (you know they could be VERY big).
And the second question regarding VPC handles ordered categorical observations
Do you have an example how should it work? I cannot get different plots for different categories
All the best,
Mittyright
HI Samer,
Thanks for the reply. I meant time to event. Is there code available to help guide simulation of VPC of time to event models available?
Lance
We filed a ticket to have an example handy meanwhile if you have a project that you have a time to event model in and that you are happy with, send it to us so we prepare the VPC example with it. Ideally use simulated dummy data that can be freely shareable.
Samer
Hi Mittyright,
I have several examples on how to process the data in R and produce plots would that work for you ?
Samer
Hi Samer,
Actually I was talking about PHX, but if you can share some examples in R I’ll appreciate that.
Thanks
Mittyright
Hi Mittyright,
Let us take this discussion offline and report back to this forums post once we have a good working solution.
Users can always export the outputs and freely process the data in R.
BR,
Samer
Dear Colleagues, I have put an example VPC with time to event data project on my box link BELOW the forum won’t allow me to upload large files like this one. Comments and questions welcome , I use R to process and present the VPC https://app.box.com/s/e7shg6pmpnanmb1ul1nx830gr7215g88