[Coxflexboost-commits] r7 - in pkg: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Dec 9 16:36:18 CET 2008
Author: hofner
Date: 2008-12-09 16:36:18 +0100 (Tue, 09 Dec 2008)
New Revision: 7
Added:
pkg/inst/
pkg/inst/CHANGES
Modified:
pkg/DESCRIPTION
pkg/R/cfboost.r
pkg/R/helpers.r
pkg/man/CoxFlexBoost-package.Rd
pkg/man/bbs.Rd
pkg/man/bols.Rd
pkg/man/boost_control.Rd
pkg/man/cfboost.Rd
pkg/man/freq.sel.Rd
pkg/man/methods.Rd
pkg/man/mstop.Rd
pkg/man/predict.cfboost.Rd
pkg/man/rSurvTime.Rd
pkg/man/risk.Rd
Log:
vers. 0.6-0
- other minor changes caused by new df2lambda
- added Technical Report
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/DESCRIPTION 2008-12-09 15:36:18 UTC (rev 7)
@@ -2,7 +2,7 @@
Type: Package
Title: Boosting Flexible Cox Models (with Time-Varying Effects)
Version: 0.6-0
-Date: 2008-10-24
+Date: 2008-12-09
Author: Benjamin Hofner
Maintainer: Benjamin Hofner <benjamin.hofner at imbe.med.uni-erlangen.de>
Description: Likelihood-based boosting approach to fit flexible,
Modified: pkg/R/cfboost.r
===================================================================
--- pkg/R/cfboost.r 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/R/cfboost.r 2008-12-09 15:36:18 UTC (rev 7)
@@ -72,6 +72,7 @@
hSi <- 1 # number of iterations in the repeat loop
df_est <- matrix(NA, nrow = mstop, ncol = length(x)) # matrix of estimated degrees of freedom
+ ## compute df2lambda which depends on the offset and on y
for (i in 1:length(x)){
if (!is.null( attr(x[[i]], "lambda"))){
attr(x[[i]],"lambda") <- attr(x[[i]], "lambda")(y, offset)
@@ -159,7 +160,7 @@
RET <- list(data = object, ### original object
ensemble = ens, ### selected base-learners
- ensembless = ensss, ### list of coefficients in each iteration
+ ensembless = ensss, ### list of coefficients in each iteration
fit = fit, ### vector of fitted values
offset = offset, ### offset
control = control, ### control parameters
Modified: pkg/R/helpers.r
===================================================================
--- pkg/R/helpers.r 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/R/helpers.r 2008-12-09 15:36:18 UTC (rev 7)
@@ -154,27 +154,21 @@
}
## helper function for df2lambda as used in bbs()
-helper_fct <- function(y, x, offset, pen, nu = 0.1, maxi= 30000, subdivisions = 100){
-
+helper_fct <- function(y, x, offset, pen, subdivisions = 100){
time <- y[,1]
delta <- y[,2]
-
- ## number of coefficients to estimate
coefs <- rep(0, ncol(x))
if(attr(x, "timedep")){
## make grid and compute grid-width if there is ANY time-dependent base-learner
sub = subdivisions ## subdivisions of time
n = length(time) ## number of observations
-
grid <- function(upper, length){
## helper function to compute grid
seq(from = 0, to = upper, length = length)
}
-
## make grid
grid <- lapply(time, grid, length = sub)
-
trapezoid_width <- rep(NA, n)
for (i in 1:n)
trapezoid_width[i] <- grid[[i]][2] # = second element, as first element == 0 and the grid equidistant for every i
@@ -182,8 +176,7 @@
grid = NULL
trapezoid_width = NULL
}
-
- ## build design matrix for currently added base-learner
+ ## build design matrix for base-learner
if (attr(x, "timedep")){
xd <- unlist(grid)
xname <- get("xname", environment(attr(x, "predict")))
@@ -201,20 +194,14 @@
} else {
desMat <- attr(x,"designMat")()
}
-
- exp_offset <- exp(offset)
- exp_pred_tconst <- 1
- exp_pred_td <- 1
-
F_pen <- function(lambda, coefficients=NULL){
if(!is.null(coefficients))
coefs <- coefficients
Fisher_mat <- integr_fisher(x, coefs, desMat,
- predictions = list(offset = exp_offset, tconst = exp_pred_tconst, td = exp_pred_td),
- controls = list(grid = grid, trapezoid_width = trapezoid_width, upper = time, nu = nu, which = "fisher"))
+ predictions = list(offset = exp(offset), tconst = 1, td = 1),
+ controls = list(grid = grid, trapezoid_width = trapezoid_width, upper = time, nu = 0.1, which = "fisher"))
if (is.null(pen)) pen <- 0
return(list(F = Fisher_mat, F_pen = Fisher_mat + lambda * pen))
}
-
return(F_pen)
}
Added: pkg/inst/CHANGES
===================================================================
--- pkg/inst/CHANGES (rev 0)
+++ pkg/inst/CHANGES 2008-12-09 15:36:18 UTC (rev 7)
@@ -0,0 +1,10 @@
+
+ CHANGES in `CoxFlexBoost' VERSION 0.6-0 (2008-12-09)
+
+ o changed computation of df2lambda
+
+ o added TechReport to manuals
+
+ ______________________________________________________________________________
+
+ `CoxFlexBoost' version 0.5 published on r-forge (2008-10-31)
Modified: pkg/man/CoxFlexBoost-package.Rd
===================================================================
--- pkg/man/CoxFlexBoost-package.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/CoxFlexBoost-package.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -16,8 +16,8 @@
\tabular{ll}{
Package: \tab CoxFlexBoost\cr
Type: \tab Package\cr
-Version: \tab 0.5-0\cr
-Date: \tab 2008-11-03\cr
+Version: \tab 0.6-0\cr
+Date: \tab 2008-12-09\cr
License: \tab GPL\cr
LazyLoad: \tab yes\cr
}
@@ -34,7 +34,10 @@
}
\references{
-~~ PUT TECH.REP. HERE ~~
+ Benjamin Hofner, Torsten Hothorn and Thomas Kneib (2008),
+ Variable Selection and Model Choice in Structured Survival Models.
+ \emph{Department of Statistics, Technical Report No. 43}.
+ \url{http://epub.ub.uni-muenchen.de/7901/}
}
\examples{
Modified: pkg/man/bbs.Rd
===================================================================
--- pkg/man/bbs.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/bbs.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -67,18 +67,20 @@
}
\note{
The degrees of freedom \code{df} are used to compute the corresponding
- smoothing parameter for the used P-spline. As this shows to be
- difficult for survival models, an approximation is used to compute the
- smoothing parameter. For more details see \cite{Hofner et al.}
+ smoothing parameter for the used P-spline. For more details see
+ \cite{Hofner et al.}.
}
\references{
- ~~ PUT TECH.REP. HERE ~~
+ Benjamin Hofner, Torsten Hothorn and Thomas Kneib (2008),
+ Variable Selection and Model Choice in Structured Survival Models.
+ \emph{Department of Statistics, Technical Report No. 43}.
+ \url{http://epub.ub.uni-muenchen.de/7901/}
Thomas Kneib, Torsten Hothorn and Gerhard Tutz (2008),
Variable selection and model choice in geoadditive regression models.
\emph{Biometrics}. To appear.
+ \url{http://epub.ub.uni-muenchen.de/2063/}
}
-\author{ Benjamin Hofner }
\seealso{ \code{\link{bols}} for linear base-learners and
\code{\link{cfboost}} for the boosting algorithm. }
\examples{
Modified: pkg/man/bols.Rd
===================================================================
--- pkg/man/bols.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/bols.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -1,4 +1,3 @@
-
\name{bols}
\alias{bols}
\alias{bolsTime}
@@ -44,13 +43,16 @@
a time-varying effect or not.
}
\references{
- ~~ PUT TECH.REP. HERE ~~
+ Benjamin Hofner, Torsten Hothorn and Thomas Kneib (2008),
+ Variable Selection and Model Choice in Structured Survival Models.
+ \emph{Department of Statistics, Technical Report No. 43}.
+ \url{http://epub.ub.uni-muenchen.de/7901/}
Thomas Kneib, Torsten Hothorn and Gerhard Tutz (2008),
Variable selection and model choice in geoadditive regression models.
\emph{Biometrics}. To appear.
+ \url{http://epub.ub.uni-muenchen.de/2063/}
}
-\author{ Benjamin Hofner }
\seealso{ \code{\link{bbs}} for P-spline base-learners and
\code{\link{cfboost}} for the boosting algorithm. }
\examples{
Modified: pkg/man/boost_control.Rd
===================================================================
--- pkg/man/boost_control.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/boost_control.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -36,7 +36,6 @@
\value{
An object of class \code{boost_control} is returned (as a list).
}
-\author{ Benjamin Hofner }
\seealso{ \code{\link{cfboost}} }
\keyword{ misc }
Modified: pkg/man/cfboost.Rd
===================================================================
--- pkg/man/cfboost.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/cfboost.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -65,9 +65,11 @@
\item{call}{the model call.}
}
\references{
- ~~ PUT TECH.REP. HERE ~~
+ Benjamin Hofner, Torsten Hothorn and Thomas Kneib (2008),
+ Variable Selection and Model Choice in Structured Survival Models.
+ \emph{Department of Statistics, Technical Report No. 43}.
+ \url{http://epub.ub.uni-muenchen.de/7901/}
}
-\author{ Benjamin Hofner }
\seealso{ \code{\link{boost_control}} for the control arguments for
\code{cfboost} and \code{\link{bols}} or \code{\link{bbs}} for the
available base-learners.
Modified: pkg/man/freq.sel.Rd
===================================================================
--- pkg/man/freq.sel.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/freq.sel.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -19,7 +19,6 @@
\value{
\code{freq.sel} returns a data.frame of class \code{fs}.
}
-\author{ Benjamin Hofner }
\seealso{ \code{\link{cfboost}} for model fitting and \code{\link[CoxFlexBoost]{methods}} for other methods for \code{cfboost} objects. }
\examples{
\dontrun{
Modified: pkg/man/methods.Rd
===================================================================
--- pkg/man/methods.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/methods.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -58,7 +58,6 @@
\code{object[i]} returns the \code{cfboost} model-object from the i-th
iteration.
}
-\author{ Benjamin Hofner }
\seealso{ \code{\link{cfboost}} for model fitting.
\code{\link{freq.sel}} for the selection frequencies of base-learners.}
\examples{
Modified: pkg/man/mstop.Rd
===================================================================
--- pkg/man/mstop.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/mstop.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -36,7 +36,6 @@
\value{
The (optimal) number of boosting iterations is returned.
}
-\author{ Benjamin Hofner }
\seealso{ \code{\link{boost_control}} for the specification of
risk-type and \code{\link{cfboost}} for the specification of
validation samples. }
Modified: pkg/man/predict.cfboost.Rd
===================================================================
--- pkg/man/predict.cfboost.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/predict.cfboost.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -32,7 +32,6 @@
\code{predict} can be used to make predictions on new data sets and
returns a vector of the predicted (log) hazard rates.
}
-\author{ Benjamin Hofner }
\seealso{ \code{\link{cfboost}} for the boosting procedure and
\code{\link{bbs}} or \code{\link{bols}} for the specification of the base-learners.}
\examples{
Modified: pkg/man/rSurvTime.Rd
===================================================================
--- pkg/man/rSurvTime.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/rSurvTime.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -1,3 +1,4 @@
+
\name{rSurvTime}
\alias{rSurvTime}
@@ -57,7 +58,6 @@
Models.
\emph{Statistics in Medicine}, \bold{24}, 1713--1723.
}
-\author{ Benjamin Hofner }
\note{ Note that the covariate values should not become too large as
otherwise numerical problems may occure. A linear predictor in the
range from -3 to 3 has shown to be sufficiently small.
Modified: pkg/man/risk.Rd
===================================================================
--- pkg/man/risk.Rd 2008-12-05 16:06:26 UTC (rev 6)
+++ pkg/man/risk.Rd 2008-12-09 15:36:18 UTC (rev 7)
@@ -57,7 +57,6 @@
\code{print} returns the given \code{object} invvisble.
}
-\author{ Benjamin Hofner }
\seealso{ for other methods for \code{cfboost} objects see \code{\link[CoxFlexBoost]{methods}}. }
\examples{
## see for example ?CoxFlexBoost-package
More information about the Coxflexboost-commits
mailing list