best.tree.bootstrap {GPLTR} | R Documentation |
parametric bootstrap on a pltr model
Description
a parametric bootstrap procedure to select and test at the same time the selected tree
Usage
best.tree.bootstrap(xtree, xdata, Y.name, X.names, G.names, B = 10, BB = 10,
args.rpart = list(cp = 0, minbucket = 20, maxdepth = 10), epsi = 0.001,
iterMax = 5, iterMin = 3, family = "binomial", LEVEL = 0.05, LB = FALSE,
args.parallel = list(numWorkers = 1), verbose = TRUE)
Arguments
xtree |
the maximal tree obtained by the function pltr.glm |
xdata |
the data frame used to build xtree |
Y.name |
the name of the dependent variable |
X.names |
the names of independent variables to consider in the linear part of the glm |
G.names |
the names of independent variables to consider in the tree part of the hybrid glm. |
B |
the size of the bootstrap sample |
BB |
the size of the bootstrap sample to compute the adjusted p-value |
args.rpart |
a list of options that control details of the rpart algorithm. |
epsi |
a treshold value to check the convergence of the algorithm |
iterMax |
the maximal number of iteration to consider |
iterMin |
the minimum number of iteration to consider |
family |
the glm family considered depending on the type of the dependent variable. |
LEVEL |
the level of the test |
LB |
a binary indicator with values TRUE or FALSE indicating weither the loading is balanced or not in the parallel computing. It is useless on a windows platform. |
args.parallel |
parameters of the parallelization. See |
verbose |
Logical; TRUE for printing progress during the computation (helpful for debugging) |
Value
a list with six elements
selected_model |
a list with the fit of the selected pltr model |
fit_glm |
the fitted pltr model under the null hypothesis if the test is not significant |
Timediff |
The execution time of the |
comp_p_values |
The P-values of the competing trees |
Badj |
The number of samples used in the inner level of the procedure |
BBadj |
The number of samples used in the outer level of the procedure |
Author(s)
Cyprien Mbogning and Wilson Toussile
References
Chen, J., Yu, K., Hsing, A., Therneau, T.M.: A partially linear tree-based regression model for assessing complex joint gene-gene and gene-environment effects. Genetic Epidemiology 31, 238-251 (2007)
See Also
Examples
#load the data set
data(data_pltr)
args.rpart <- list(minbucket = 40, maxdepth = 10, cp = 0)
family <- "binomial"
Y.name <- "Y"
X.names <- "G1"
G.names <- paste("G", 2:15, sep="")
## Not run:
## build a maximal tree
fit_pltr <- pltr.glm(data_pltr, Y.name, X.names, G.names,
args.rpart = args.rpart, family = family, iterMax = 5, iterMin = 3)
## select an test the selected tree by a parametric bootstrap procedure
args.parallel = list(numWorkers = 1, type = "PSOCK")
best_bootstrap <- best.tree.bootstrap(fit_pltr$tree, data_pltr, Y.name, X.names,
G.names, B = 10, BB = 10, args.rpart = args.rpart, epsi = 0.001,
iterMax = 5, iterMin = 3, family = family, LEVEL = 0.05,LB = FALSE,
args.parallel = args.parallel)
## End(Not run)