Learn R Programming

survHE (version 2.0.5)

write.surv: write.surv

Description

Writes the survival summary to an excel file (helpful to then call the values in the Markov model)

Usage

write.surv(object, file, sheet = NULL, what = "surv")

Value

A spreadsheet file with the simulation(s) of the relevant quantity

Arguments

object

a summary.flexsurvreg object containing the survival curves (with times, estimates and interval limits)

file

a string with the full path to the file name to be saved

sheet

a string with the name of the sheet to be created

what

a string to describe what to be exported. Can either be 'surv' (default), which outputs the simulation(s) for the survival curves or 'sim', which outputs the simulation(s) for the underlying model parameters. If there are several 'profiles', they get written in separate spreadsheets and a clear indication is given as the name of the spreadsheet

Author

Gianluca Baio

Details

Something will go here

References

G Baio (2019). survHE: Survival analysis for health economic evaluation and cost-effectiveness modelling. Journal of Statistical Software (2020). vol 95, 14, 1-47. doi:10.18637/jss.v095.i14

See Also

make.surv

Examples

Run this code
if (FALSE) {
# Loads an example dataset from 'flexsurv'
data(bc)

# Fits the same model using the 3 inference methods
mle = fit.models(formula=Surv(recyrs,censrec)~group,data=bc,
    distr="exp",method="mle")
p.mle = make.surv(mle)
write.surv(p.mle,file="test.xlsx")
}

Run the code above in your browser using DataLab