prism: Partially Recursively Induced Structured Moderation

Description Usage Arguments Details Value Note References Examples

View source: R/prism.R

Description

Generate the tree model for prism and hprism algorithm.

Usage

1
prism(formula, dat, hvar = NULL, cp.prism = 0)

Arguments

formula

A two sided formula, with a survival response on the left of a ~ operator and the splitting variables, separated by + operatiors, on the right. Prism variable is specified within offset() argument at the last term of the formula. See example for detail.

dat

An data frame in which to interpret the variables named in the formula.

hvar

The hierarchical level variable for hprism tree, which is specified within double quotes. If unspecified, prism tree is fitted instead. See Example for detail.

cp.prism

Prune all nodes with a complexity less than cp from the printout. Default value is 0. See details in the help file for rpart function.

Details

Please see Partially Recursively Induced Structured Moderation (PRISM) For Better Understanding Racial Differences in Endometrial Cancer Survival for detials.

Should use logrithm of survival time in the outcome of prism model.

Value

A list with components

Note

Acknowledgements: JSR and HY were partially supported by grant U54-MD010722. JSR was also partially supported by grant UL1-TR000460.

References

T. Hastie and R. Tibshirani, “Varying coefficient models,” Journal of the Royal Statistical Society B, vol. 55, pp. 757–779, 1993.

W. Stute, “Consistent estimation under random censorship when covariables are present,” Journal of Multivariate Analysis, vol. 45, pp. 89–103, 1993.

L. Breiman, J. Friedman, R. Olshen, and C. Stone, “Classification and regression trees, wadsworth & brooks,” 1984.

Zhou, H., Hanson, T., and Zhang, J. (2018). spBayesSurv: Fitting Bayesian Spatial Survival Models Using R. Journal of Statistical Software accept minor URL http://arxiv.org/abs/1705.04584.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
#LeukSurv dataset is from the spBayesSurv package, which studies possible spatial variation of survival of adult AML patients in Northwest England.
#Outcome is time (survival time in days) with right censoring information where cens=0 represents censored and cens=1 represents dead.
#age, wbc are treated as individual variables where age represents age in years and wbc represents white blood cell count at diagnosis, truncated at 500.
#sex is treated as focus variable where 1 represents male and 0 represent female.
#tpi is treated as contextual variable, which is the Townsend score for which higher values indicates less affluent areas.
#In the original dataset, tpi is treated as an individual level variable since Townsend score is available at enumeration district, whose size is
#negligible in comparison with the region studied in the paper.
#We also average the Townsend score at a distrct (administrative district of residence) level, and name it tpi.m.
#Using actual Townsend score as a contextual variable is like examing very localized contextual information whereas using averaged Townsend score should
#produce a "smoothing" effect.
data(LeukSurv,package="spBayesSurv")
Leuk<-LeukSurv
Leuk$tpi.m<-ave(Leuk$tpi,Leuk$district)
Leuk$survtime<-log(Leuk$time)
l.prism<-prism(Surv(survtime,cens)~age+wbc+offset(sex),dat=Leuk,cp.prism=0.01)
l.hprism<-prism(Surv(survtime,cens)~age+wbc+offset(sex),hvar="tpi",dat=Leuk,cp.prism=0.01)
l.hprism1<-prism(Surv(survtime,cens)~age+wbc+offset(sex),hvar="tpi.m",dat=Leuk,cp.prism=0.01)

## End(Not run)

yuhuilin619/prism documentation built on July 18, 2019, 5:41 p.m.