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

S3 predict function for pamm objects #139

Open
6 tasks
adibender opened this issue Feb 8, 2020 · 2 comments · May be fixed by #140
Open
6 tasks

S3 predict function for pamm objects #139

adibender opened this issue Feb 8, 2020 · 2 comments · May be fixed by #140
Assignees
Labels
feature feature requests priority: low

Comments

@adibender
Copy link
Owner

predict.pamm <- function(
  object, 
  newdata, 
  type = c("response", "mrl", "hazard", "cumulative hazard", "survival probability"), 
  se.type = c("direct", "sim", "delta"), 
  ...) {}
  • should it have a times argument by default?

  • return value:

    • expected survival time and mrl: vector of length nrow(newdata)
    • hazard, cumulative hazard and survival probability: ???
  • alternatively, only allow response and mrl since other response types are covered in add_* functions

  • what if user wants the mgcv predictions, i.e. predict.gam instead of predict.pamm?

  • return types (type = ...):

adibender added a commit that referenced this issue Feb 8, 2020
@adibender adibender added addition feature feature requests labels Feb 8, 2020
@adibender adibender self-assigned this Feb 8, 2020
@adibender adibender linked a pull request Feb 8, 2020 that will close this issue
@iMSQ
Copy link

iMSQ commented Nov 30, 2021

FYI, predictSurvProb() function (page 28, https://cran.r-project.org/web/packages/pammtools/pammtools.pdf) doesn't work with gam objects (pamm fitted model by mgcv::gam). Now it works with gaussian family implemented for glm only
(https://rdrr.io/cran/pec/src/R/predictSurvProb.R).

@adibender
Copy link
Owner Author

thx @iMSQ. Could you open up a separate issue with a preprex regarding predictSurvProb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature feature requests priority: low
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants