write.surv: write.surv

View source: R/write.surv.R

write.survR Documentation

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")

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

Details

Something will go here

Value

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

Author(s)

Gianluca Baio

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

## Not run: 
# 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")

## End(Not run)

survHE documentation built on Oct. 4, 2024, 5:10 p.m.