Package CoxRidge. February 27, 2015

Similar documents
The mfp Package. July 27, GBSG... 1 bodyfat... 2 cox... 4 fp... 4 mfp... 5 mfp.object... 7 plot.mfp Index 9

Multivariable Fractional Polynomials

The mfp Package. R topics documented: May 18, Title Multivariable Fractional Polynomials. Version Date

Multivariable Fractional Polynomials

The coxvc_1-1-1 package

Package idmtpreg. February 27, 2018

A fast routine for fitting Cox models with time varying effects

Package crrsc. R topics documented: February 19, 2015

Package penalized. February 21, 2018

Fractional Polynomials and Model Averaging

Package ICBayes. September 24, 2017

The nltm Package. July 24, 2006

Package JointModel. R topics documented: June 9, Title Semiparametric Joint Models for Longitudinal and Counting Processes Version 1.

Package SimSCRPiecewise

Package scio. February 20, 2015

Package shrink. August 29, 2013

Package survidinri. February 20, 2015

Package BayesNI. February 19, 2015

Package anoint. July 19, 2015

Package threg. August 10, 2015

The influence of categorising survival time on parameter estimates in a Cox model

Package covtest. R topics documented:

Package TwoStepCLogit

Package penmsm. R topics documented: February 20, Type Package

Package spcov. R topics documented: February 20, 2015

Package CPE. R topics documented: February 19, 2015

Package ltsbase. R topics documented: February 20, 2015

Package darts. February 19, 2015

Package ICGOR. January 13, 2017

Package ShrinkCovMat

Package netcoh. May 2, 2016

Package pssm. March 1, 2017

Reduced-rank hazard regression

Package clogitboost. R topics documented: December 21, 2015

Package metafuse. October 17, 2016

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0.

Package InferenceSMR

Package BNN. February 2, 2018

Package gma. September 19, 2017

Package jmcm. November 25, 2017

Package flexcwm. R topics documented: July 2, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.1.

Package GORCure. January 13, 2017

Package icmm. October 12, 2017

Towards stratified medicine instead of dichotomization, estimate a treatment effect function for a continuous covariate

Package sbgcop. May 29, 2018

REGRESSION ANALYSIS FOR TIME-TO-EVENT DATA THE PROPORTIONAL HAZARDS (COX) MODEL ST520

Package leiv. R topics documented: February 20, Version Type Package

Package msir. R topics documented: April 7, Type Package Version Date Title Model-Based Sliced Inverse Regression

Package MonoPoly. December 20, 2017

Package factorqr. R topics documented: February 19, 2015

Package ebal. R topics documented: February 19, Type Package

Package SightabilityModel

Multivariate Survival Analysis

Package spef. February 26, 2018

Relative-risk regression and model diagnostics. 16 November, 2015

Package rbvs. R topics documented: August 29, Type Package Title Ranking-Based Variable Selection Version 1.0.

Package ARCensReg. September 11, 2016

Package face. January 19, 2018

Survival Analysis. 732G34 Statistisk analys av komplexa data. Krzysztof Bartoszek

Package MiRKATS. May 30, 2016

Package AID. R topics documented: November 10, Type Package Title Box-Cox Power Transformation Version 2.3 Date Depends R (>= 2.15.

Package SpatialVS. R topics documented: November 10, Title Spatial Variable Selection Version 1.1

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

flexsurv: flexible parametric survival modelling in R. Supplementary examples

Package REGARMA. R topics documented: October 1, Type Package. Title Regularized estimation of Lasso, adaptive lasso, elastic net and REGARMA

Package sodavis. May 13, 2018

Package basad. November 20, 2017

Package RootsExtremaInflections

Package comparec. R topics documented: February 19, Type Package

Package CorrMixed. R topics documented: August 4, Type Package

Package mpmcorrelogram

Package spatial.gev.bma

Package hds. December 31, 2016

Package weightquant. R topics documented: December 30, Type Package

Package NonpModelCheck

Package pearson7. June 22, 2016

Package rnmf. February 20, 2015

Package complex.surv.dat.sim

Package LBLGXE. R topics documented: July 20, Type Package

Package R1magic. August 29, 2016

Package CompQuadForm

Package mmabig. May 18, 2018

Package SPreFuGED. July 29, 2016

Package bcrocsurface

Package CopulaRegression

Package DTK. February 15, Type Package

Package RI2by2. October 21, 2016

A new strategy for meta-analysis of continuous covariates in observational studies with IPD. Willi Sauerbrei & Patrick Royston

Survival Regression Models

Lecture 7 Time-dependent Covariates in Cox Regression

The sbgcop Package. March 9, 2007

Package OUwie. August 29, 2013

Package Blendstat. February 21, 2018

Package pendensity. March 13, 2016

Package sklarsomega. May 24, 2018

Assessment of time varying long term effects of therapies and prognostic factors

Package locfdr. July 15, Index 5

Package rgabriel. February 20, 2015

Package bmem. February 15, 2013

Package severity. February 20, 2015

Transcription:

Type Package Title Cox Models with Dynamic Ridge Penalties Version 0.9.2 Date 2015-02-12 Package CoxRidge February 27, 2015 Author Aris Perperoglou <aperpe@essex.ac.uk> Maintainer Aris Perperoglou <aperpe@essex.ac.uk> A package for fitting Cox models with penalized ridge-type partial likelihood. The package includes functions for fitting simple Cox models with all covariates controlled by a ridge penalty. The weight of the penalty is optimised by using a REML typealgorithm. Models with time varying effects of the covariates can also be fitted. Some of the covariates may be allowed to be fixed and thus not controlled by the penalty. There are three different penalty functions, ridge, dynamic and weighted dynamic. Time varying effects can be fitted without the need of an expanded dataset. Depends survival,splines LazyLoad yes License GPL (>= 2) Repository CRAN NeedsCompilation no Date/Publication 2015-02-27 12:09:03 R topics documented: CoxRidge-package..................................... 2 comp.graph......................................... 2 cox.ridge.......................................... 3 CoxRidge internal...................................... 5 Dynamic.Ridge....................................... 5 GBSG............................................ 7 ova.............................................. 8 print.cox.dynamic.ridge................................... 9 print.cox.ridge........................................ 10 Index 11 1

2 comp.graph CoxRidge-package Fit penalized Cox models with fixed and time varying effects of the covariates. Details Fits penalized Cox models using ridge penalties and a REML-type algorithm for optimization. The methods can be applied also to non-proportional hazards models where some or all of the covariates can be modelled with time varying effects. Package: CoxRidge Type: Package Version: 0.9.1 Date: 2013-06-20 License: GPL (>= 2) Author(s) Aris Perperoglou <aperpe@essex.ac.uk> Maintainer: Aris Perperoglou <aperpe@essex.ac.uk> References Perperoglou A.(2013)Cox models with dynamic ridge penalties on time varying effects of the covariates. Statistics in Medicine, to appear comp.graph Plot a cox.ridge or cox.dynamic.ridge object. Plots time varying effects of covariates. comp.graph(obj, alpha = 0.05, xlab = "time", ylab = "X effect", all.terms = TRUE, variable)

cox.ridge 3 Arguments obj alpha xlab ylab all.terms variable A cox.ridge or cox.dynamic.ridge object. The alpha level used for confidence bands. a title for the x axis a title for the y axis When TRUE all time-varying effects variables are plotted. when all.terms=false you need to specify which variable to be plotted. Use numbers 1,2,3... for first, second, third etc. Details Confidence bands are computed using the delta method. References Perperoglou A, le Cessie S, van Houwelingen HC (2006). Reduced-rank hazard regression for modelling non-proportional hazards. Statistics in Medicine: 25, 2831-2845 See Also plot data(ova) attach(ova) X <- cbind(karn,diam,figo) X <- apply(x,2,function(x){(x-mean(x))/sqrt(var(x))}) Ft <- cbind(rep(1,nrow(x)),bs(time)) fit <- Dynamic.Ridge(time,death,X,Ft=Ft,fun="simple") comp.graph(fit,all.terms=false,variable=1) par(mfrow=c(3,1)) comp.graph(fit) cox.ridge Fit a Cox model with a ridge penalty on all covariates Fits a simple Cox model with a ridge penalty on all coefficients. The penalty weight can be optimized using a REML-type likelihood method or be chosen by the user. cox.ridge(formula, lambda = 1, lambdafixed = FALSE, eps = 10e-6, data = sys.parent(), iter.max = 200, mon = FALSE)

4 cox.ridge Arguments Value formula lambdafixed lambda eps data a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a survival object as returned by the Surv function. when TRUE the function does not seek to optimize the penalty weight. When lambdafixed is FALSE lambda is a scalar giving the starting value for the weight of the penalty. When lambdafixed is true lambda is the chosen weight of the penalty. a small value. The criterion of convergance. an optional data frame containing the variables named in the formula. iter.max maximum number of iterations, default is 200. mon when true the function prints out the computed lambda weigh in each iteration. cox.ridge returns an object of class "cox.ridge" The function print.cox.ridge is used to obtain and print a summary of the results. An object of class "cox.ridge" is a list containing the following components: call coef loglik time death X iter inter.it lambda Hat hess function call. the vector of coefficients. the penalized log-likelihood of the model. a vector with failure/censoring times. a vector of status indicator. a matrix of covariates. number of iterations used to maximise likelihood at a fixed lambda. number of iterations used to find optimal lambda. optimal weight of the penalty. the hat matrix at convergance. the Hessian matrix of second derivatives. Note The function at the current form cannot handle missing values. The user has to take prior action with missing values before using this function. Author(s) Aris Perperoglou References Perperoglou A.(2013)Cox models with dynamic ridge penalties on time varying effects of the covariates. Statistics in Medicine, to appear

CoxRidge internal 5 See Also coxph, Dynamic.Ridge data(ova) attach(ova) X <- cbind(karn,diam,figo) X <- apply(x,2,function(x){(x-mean(x))/sqrt(var(x))})#standardize covariates fit <- cox.ridge(surv(time,death)~x,lambda=1) fit ##regression coefficients correspond to the standardized covariates CoxRidge internal Internal CoxRidge functions. Internal CoxRidge functions. Details These are not to be called by the user Dynamic.Ridge Fit a Cox model with time dependent effects of the covariates and penalized likelihood. Fits a Cox model on which some, or all, of the covariates are allowed to have time varying effects. The likelihood is penalized either using a simple ridge penalty on all time varying covariates ("simple") or a dynamic ridge penalty ("dynamic") which includes the used time functions in the penalty. There is also the option for a "weighted" ridge penalty based on the baseline hazard. Dynamic.Ridge(time, death, X, R, Ft, lambda = 0, fun = c("dynamic", "weighted","simple"), eps = 1e-06, iter.max = 200, theta, mon = FALSE, lambdafixed = FALSE)

6 Dynamic.Ridge Arguments time death X R Ft Value lambda fun eps a vector containing failure/censoring times. a vector containing the status indicator. a matrix of time varying covariates. an optional matrix of time fixed covariates. When R is missing then all covariates are assumed to be time varying. a matrix containing the time functions. The first column must be constant. When lambdafixed is FALSE lambda is a scalar giving the starting value for the weight of the penalty. When lambdafixed is true lambda is the chosen weight of the penalty. "simple", "dynamic", or "weigthed": types of penalty. a small value. The criterion of convergance. iter.max maximum number of iterations, default is 200. theta mon lambdafixed an optional matrix of starting values for coefficients of time varying effects. when true the function prints out the computed lambda weigh in each iteration. when TRUE the function does not seek to optimize the penalty weight. Dynamic.Ridge returns an object of class "cox.dynamic.ridge" The function print.cox.dynamic.ridge is used to obtain and print a summary of the results. An object of class "cox.dynamic.ridge" is a list containing some the following components: call theta fixed.coef loglik time death X R Ft iter inter.it lambda Hat h2 function call. a matrix of coefficient for the covariates with time varying effects. the vector of fixed effects coefficients. the penalized log-likelihood of the model. a vector with failure/censoring times. a vector of status indicator. the matrix of time varying covariates. the matrix of fixed covariates. the matrix of time functions number of iterations used to maximise likelihood at a fixed lambda. number of iterations used to find optimal lambda. optimal weight of the penalty. the hat matrix at convergance. the non-penalized Hessian matrix of second derivatives. Note The function at the current form cannot handle missing values. The user has to take prior action with missing values before using this function.

GBSG 7 Author(s) Aris Perperoglou References Perperoglou A.(2013)Cox models with dynamic ridge penalties on time varying effects of the covariates. Statistics in Medicine, to appear See Also coxph, cox.ridge data(gbsg) attach(gbsg) X <- cbind(age,grade) R <- cbind(tumsize,posnodal,prm,esm) X <- apply(x,2,function(x){(x-mean(x))/sqrt(var(x))}) #standardize covariates R <- apply(r,2,function(x){(x-mean(x))/sqrt(var(x))}) #standardize covariates Ft <- cbind(rep(1,nrow(x)),bs(rfst)) # a model with all covariates as time varying, simple penalty fit.dr <- Dynamic.Ridge(rfst,cens,cbind(X,R),Ft=Ft,lambda=100,fun="simple",lambdaFixed=TRUE) fit.dr #regression coefficients correspond to the standardized covariates # a model with all covariates as time varying, weighted penalty fit.wdr <- Dynamic.Ridge(rfst,cens,cbind(X,R),Ft=Ft,lambda=324,theta=fit.dr$theta, fun="weighted",mon=true) fit.wdr #regression coefficients correspond to the standardized covariates # a model with fixed and time varying covariates fit.dr <- Dynamic.Ridge(rfst,cens,X,R,Ft,lambda=150,fun="simple",lambdaFixed=TRUE) fit.dr GBSG German Breast Cancer Study Group. A data frame containing the observations from the GBSG study. data(gbsg)

8 ova Format Source This data frame contains the observations of 686 women: id patient id 1...686. htreat hormonal therapy, a factor at two levels 0 (no) and 1 (yes). age age of the patients in years. menostat menopausal status, a factor at two levels 1 (premenopausal) and 2 (postmenopausal). tumsize tumor size (in mm). grade tumor grade. posnodal number of positive nodes. prm progesterone receptor (in fmol). esm estrogen receptor (in fmol). rfst rfst recurrence free survival time (in days). cens censoring indicator (0 censored, 1 event). Beyerle, R.L.A. Neumann and H.F. Rauschecker for the German Breast Cancer Study Group (1994). Randomized 2x 2 trial evaluating hormonal treatment and the duration of chemotherapy in nodepositive breast cancer patients. Journal of Clinical Oncology, 12, 2086-2093. W. Sauerbrei and P. Royston (1999). Building multivariable prognostic and diagnostic models: transformation of the predictors by using fractional polynomials. Journal of the Royal Statistics Society Series A, Volume 162(1), 71-94. References package(mfp) data(gbsg) str(gbsg) ova Ovarian cancer data set Survival times of 358 ovarian cancer patients with information on three covariates, karnofsky status (karn), tumor diameter (diam), figo stage (figo) and patients id. data(ova)

print.cox.dynamic.ridge 9 Format A data frame with 358 observations on the following 6 variables. time Survival times in days. death Status indicator, 0=censored, 1=death. karn Karnofsky status at the start of the follow up. figo Figo stage. diam Timour diameter. x Patient id. Source Verweij, P. J. M. and Van Houwelingen H. C. (1993) Cross-validation in survival analysis. Statistics in Medicine: 12, 2305-2314 data(ova) str(ova) print.cox.dynamic.ridge Print a cox.dynamic.ridge object. Information describing the fitted cox.dynamic.ridge object. ## S3 method for class cox.dynamic.ridge print(x,...) Arguments x a cox.dynamic.ridge object.... optional arguments passed to print.default; see the documentation on that method function. See Also Dynamic.Ridge.

10 print.cox.ridge data(gbsg) attach(gbsg) X <- cbind(age,grade) R <- cbind(tumsize,posnodal,prm,esm) X <- apply(x,2,function(x){(x-mean(x))/sqrt(var(x))}) #standardize covariates R <- apply(r,2,function(x){(x-mean(x))/sqrt(var(x))}) #standardize covariates Ft <- cbind(rep(1,nrow(x)),bs(rfst)) # a model with all covariates as time varying, simple penalty fit.dr <- Dynamic.Ridge(rfst,cens,cbind(X,R),Ft=Ft,lambda=10,fun="simple",lambdaFixed=TRUE) fit.dr print.cox.ridge Print a cox.ridge object. Information describing the fitted cox.ridge object. ## S3 method for class cox.ridge print(x,...) Arguments x See Also a cox.ridge object.... optional arguments passed to print.default; see the documentation on that method function. cox.ridge. data(ova) attach(ova) X <- cbind(karn,diam,figo) X <- apply(x,2,function(x){(x-mean(x))/sqrt(var(x))})#standardize covariates fit <- cox.ridge(surv(time,death)~x,lambda=1,lambdafixed=true) fit ##regression coefficients correspond to the standardized covariates

Index Topic Dynamic.Ridge Dynamic.Ridge, 5 Topic comp.graph comp.graph, 2 Topic cox.ridge cox.ridge, 3 Topic datasets GBSG, 7 ova, 8 Topic package CoxRidge-package, 2 Topic print.cox.dynamic.ridge print.cox.dynamic.ridge, 9 Topic print.coxr.ridge print.cox.ridge, 10 Topic sumevents,sumevents CoxRidge internal, 5 comp.graph, 2 cox.ridge, 3, 10 CoxRidge (CoxRidge-package), 2 CoxRidge internal, 5 CoxRidge-package, 2 Dynamic.Ridge, 5, 9 GBSG, 7 ova, 8 print.cox.dynamic.ridge, 9 print.cox.ridge, 10 sumevents (CoxRidge internal), 5 sumeventsf (CoxRidge internal), 5 11