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

Slight changes to the plot? #4

Open
giabaio opened this issue Nov 30, 2022 · 3 comments
Open

Slight changes to the plot? #4

giabaio opened this issue Nov 30, 2022 · 3 comments

Comments

@giabaio
Copy link
Contributor

giabaio commented Nov 30, 2022

Hi @n8thangreen and @Zhaojingche. A few comments/ideas from me:

  1. I've pushed a new version in which I've included a weightplot function (to, well... plot the resulting weight function from a blendR object. To do that, I've slightly modified the output of blendsurv to return the weights and other helpful things... We may stipulate to store these extra bits into a misc object inside the main output?).

  2. I also think we could improve slightly the appearance of the plot function --- how about adding this?

theme_bw() + theme(legend.position=c(.9,.85),legend.background = element_rect(fill='transparent'))

I think the resulting picture would like a bit nicer...

  1. @n8thangreen: why do you need to create specialised copies of make.surv? Can't survHE take care directly of what you need it to do?

  2. Could survHE::summary.survHE be used on the blendR object to compute the mean survival time? To do so, you need to format the blendR object in a way that survHE understands directly --- and I'm not sure you want to do that, because it may mess up with other things...

  3. Like I said this morning, I would probably try and find ways to summarise the results of the blending process... Maybe looking at the hazard or density functions for the resulting blended curve may be a good idea. Maybe also add another parameter alpha_1 <- 0.02 and use that to plot the ribbon around the short/long term extrapolations so that the blended part is easier to visualise?

  4. Under Rstudio can we use the manipulate package to create a semi-live version of the process that chooses the weights and how that impact the blending?

OK --- this is it from me, for now... Do these make sense?

@n8thangreen
Copy link
Collaborator

Thanks.
1-2 sounds fine
3. I thought this was the most general way of doing it. If its all in survHE already sure, or do you mean to move this to there?
4. I don't see why not...
5. I was thinking of contour-type grids of alpha by beta for E[S] or something. The shinyStan gui has loads of funky diagnostic plots for inspiration?
6. Nice. This is really easy to do too

@giabaio
Copy link
Contributor Author

giabaio commented Nov 30, 2022

Re 3. I don't mean to move this under survHE --- blendR should remain a separate package. But I wonder whether it's better to not duplicate functions --- what if we change/improve survHE::make_surv? Then we'd have to modify the code in blendR too... Then again, if we have only one version of the function, we'd need to worry of the implications of changes in survHE over the output in blendR, so there probably is no clear solution...

Re 5. I like that! We should look into it!

@Zhaojingche
Copy link
Collaborator

Zhaojingche commented Nov 30, 2022 via email

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

3 participants