Skip to content

Conversation

@hfrick
Copy link
Member

@hfrick hfrick commented Nov 9, 2022

For flexsurv::flexsurvreg(), we use predictions of type "link" for our prediction type "linear_pred". Those predictions from flexsurv are on the natural scale of the location parameter. censored returns predictions on the unrestricted scale.

For example, for the "weibull" distribution those predictions need to be transformed to the log scale.
For some other distributions, the natural scale and the unrestricted scale are the same, so no transformation is needed, e.g. dist = "lnorm".

This PR uses the appropriate transformations, already stored in the flexsurv object, instead of always using the log transformation.

#213 (comment)

@hfrick hfrick marked this pull request as ready for review November 9, 2022 18:59
@hfrick hfrick merged commit a6af000 into main Nov 9, 2022
@hfrick hfrick deleted the linear_pred-flexsurvreg branch November 9, 2022 19:00
@hfrick hfrick restored the linear_pred-flexsurvreg branch November 9, 2022 19:01
@hfrick hfrick deleted the linear_pred-flexsurvreg branch November 9, 2022 19:02
@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants