Gamma model for survival data

I am trying to calculate the expected mean for progression free survival data for Gamma model, However, the following error keep resulting:

mean_gamma(shape = 1.497, scale=0.80*0.4268)

Error in mean_gamma(shape = 1.497, scale = 0.8 * 0.4268) : unused argument (scale = 0.8 * 0.4268)

cant understand what went wrong?

What information did you look at that prompted you to include scale = in the function call?

Thanks for your response
I need to calculate mean survival for gamma model.

Thank you

I dont think you understood my question but I'm not sure how to ask it differently.
Can you say what package/Library the function belongs to ?

I am doing a Parametric modelling using flexsurv.

Thank you

The Mean gamma function there has no scale parameter. It has shape and rate.

yh I found this, but then how to distinguish between 2 treatment groups, as I ran the code for Weibull model as follow:

calculate mean survival for each arm


mean_weibullPH(shape = 1.497, scale=0.113)

gp1, for the weibullPH the scale is multiplied by HR

mean_weibullPH(shape = 1.497, scale=0.74*0.113)

so if there is no scale in gamma model, how to calculate mean survival for gp 1?

Thank you

I suppose I would follow this and have rate be inverse scale.

Is this what you mean ?
group 0 (placebo. standard treatment):

mean_gamma(shape = 1.44, rate=1/1.44)

if yes.. how about group 1 ( new treatment)?

Thank you so much and appreciate your time

Does this what you mean ?

#group 0 (placebo. standard treatment):
mean_gamma(shape = 1.74, rate=1) #1.74

# group 1 ( new treatment)
mean_gamma(shape = 1.74, rate=1/1.74)  # 3.0276

is this a correct use of codes ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.