Skip to content

Commit 7272361

Browse files
committed
update docu for CRAN
1 parent d948f05 commit 7272361

7 files changed

Lines changed: 17 additions & 33 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Collate:
5858
'methods.R'
5959
'stabsel.R'
6060
'utilityFunctions.R'
61-
RoxygenNote: 7.2.1
61+
RoxygenNote: 7.2.3
6262
Encoding: UTF-8
6363
BugReports: https://github.com/boost-R/FDboost/issues
6464
URL: https://github.com/boost-R/FDboost

R/FDboost.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
#' With \code{FDboost} the following covariate effects can be estimated by specifying
107107
#' the following effects in the \code{formula}
108108
#' (similar to function \code{\link[refund]{pffr}}
109-
#' in R-package \code{\link[refund:refund-package]{refund}}).
109+
#' in R-package refund.
110110
#' The \code{timeformula} is used to expand the effects in \code{t}-direction.
111111
#' \itemize{
112112
#' \item Linear functional effect of scalar (numeric or factor) covariate \eqn{z} that varies

R/bootstrapCIs.R

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,10 @@
101101
#' plot(bootCIs, ask = FALSE)
102102
#' }
103103
#'
104-
#' ## now speed things up by defining the inner resampling
105-
#' ## function with parallelization based on mclapply (does not work on Windows)
106-
#' isWindows <- Sys.info()['sysname']=="Windows"
107-
#'
108104
#' my_inner_fun <- function(object){
109105
#' cvrisk(object, folds = cvLong(id = object$id, weights =
110-
#' model.weights(object),
111-
#' B = 10 # 10-fold for inner resampling
112-
#' ), mc.cores = if(isWindows) 1 else 10) # use ten cores
106+
#' model.weights(object), B = 2) # 10-fold for inner resampling
107+
#' )
113108
#' }
114109
#'
115110
#' \donttest{
@@ -121,8 +116,7 @@
121116
#' ## function in the outer resampling
122117
#'
123118
#' \donttest{
124-
#' bootCIs <- bootstrapCI(m1, mc.cores = if(isWindows) 1 else 30,
125-
#' B_inner = 5, B_outer = 3)
119+
#' bootCIs <- bootstrapCI(m1, B_inner = 5, B_outer = 3)
126120
#' }
127121
#'
128122
#' ## Now let's parallelize the outer resampling and use
@@ -132,16 +126,14 @@
132126
#' cvrisk(object, folds = cvLong(id = object$id, weights =
133127
#' model.weights(object), type = "kfold", # use CV
134128
#' B = 5, # 5-fold for inner resampling
135-
#' ),
136-
#' mc.cores = if(isWindows) 1 else 5) # use five cores
129+
#' )) # use five cores
137130
#' }
138131
#'
139132
#' # use applyFolds for outer function to avoid messing up weights
140133
#' my_outer_fun <- function(object, fun){
141134
#' applyFolds(object = object,
142135
#' folds = cv(rep(1, length(unique(object$id))),
143-
#' type = "bootstrap", B = 10), fun = fun,
144-
#' mc.cores = if(isWindows) 1 else 10) # parallelize on 10 cores
136+
#' type = "bootstrap", B = 10), fun = fun) # parallelize on 10 cores
145137
#' }
146138
#'
147139
#' \donttest{

R/crossvalidation.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ applyFolds <- function(object, folds = cv(rep(1, length(unique(object$id))), typ
646646
#' mod <- mod[75]
647647
#'
648648
#' #### create folds for 3-fold bootstrap: one weight for each curve
649-
#' set.seed(123)
649+
#' set.seed(124)
650650
#' folds_bs <- cv(weights = rep(1, mod$ydim[1]), type = "bootstrap", B = 3)
651651
#'
652652
#' ## compute out-of-bag risk on the 3 folds for 1 to 75 boosting iterations
@@ -670,7 +670,7 @@ applyFolds <- function(object, folds = cv(rep(1, length(unique(object$id))), typ
670670
#' ## plot the estimated coefficients per fold
671671
#' ## more meaningful for higher number of folds, e.g., B = 100
672672
#' par(mfrow = c(2,2))
673-
#' plotPredCoef(cvr2, terms = FALSE, which = 2)
673+
#' plotPredCoef(cvr2, terms = FALSE, which = 1)
674674
#' plotPredCoef(cvr2, terms = FALSE, which = 3)
675675
#'
676676
#' ## compute out-of-bag risk and predictions for leaving-one-curve-out cross-validation

man/FDboost.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/bootstrapCI.Rd

Lines changed: 5 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/validateFDboost.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)