-
Notifications
You must be signed in to change notification settings - Fork 28
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
predictions on the scale of the response #17
Comments
A couple of people have also suggested this feature to me. I'll put it on the long term todo list (I'm pretty busy in the next few months) but for reference, what exactly would you want this to do? For example it could behave like predict.survreg, and give a point estimate of survival time for someone with the given covariates. In survreg, the point estimate is defined by the location/scale/link parameterisation. In flexsurvreg, that could be the mean or the median of the fitted survival distribution, but a problem might be that these are not always available analytically, and numerical integration would be needed. Generalized gamma: I think the mean has a complicated form, but you could get the median with qgengamma(0.5, ) |
As mentioned, I use this in a slightly different manner. In my case, |
If I understand univ12 correctly as wanting the ability to calculate the predicted mean response, then #23 would implement this in summary.flexsurvreg. |
Yes. It would also be nice to have a |
Perhaps summary should wrap the predict method instead? Predict usually just returns a vector of predicted values, so it is a subset of what is needed for summary.flexsurvreg as it currently operates.
Though right now, summary.flexsurvreg operates a bit outside of the norm of what summary functions do by effectively generated predicted values rather than providing a more general summary of the model. Of course, changing that behavior would be a breaking change…
From: chjackson <notifications@github.com>
Reply-To: chjackson/flexsurv-dev <reply@reply.github.com>
Date: Monday, February 13, 2017 at 7:56 AM
To: chjackson/flexsurv-dev <flexsurv-dev@noreply.github.com>
Cc: Jordan Amdahl <jrdnmdhl@gmail.com>, Comment <comment@noreply.github.com>
Subject: Re: [chjackson/flexsurv-dev] predictions on the scale of the response (#17)
Yes. It would also be nice to have a predict() method to wrap this, which behaves like glm and / or survival
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
I think this is also sufficiently addressed w/ #27, both in terms of means and medians. |
Merge issue with #39 |
I am kind of "abusing" your package for fitting a GLM using the generalized gamma distribution you define in the package. To do this, I consider all observations to be events, no censoring. This works quite well in practice.
Example:
but I have difficulties predicting on new data, as the predictions are not on the scale of the response y.
I predict using
But I want something like
predict(m, df.new, type="response")
. I could not find any information in the vignette.The text was updated successfully, but these errors were encountered: