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. minbucket: the minimum number of observations in any terminal <leaf> node; cp: complexity parameter (Any split that does not decrease the overall lack of fit by a factor of cp is not attempted); maxdepth: the maximum depth of any node of the final tree, with the root node counted as depth 0. ...
See rpart.control for further details
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 mclapply for more details
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 selected tree tree, the p-value of the selected tree p.value, the ajusted p-value of the selected tree adj_p.value and an indicator Tree_Selected to assess wether the test is significant or not.
fit_glm
the fitted pltr model under the null hypothesis if the test is not significant
Timediff
The execution time of the parametric bootstrap procedure
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
p.val.tree
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)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(GPLTR)
Loading required package: rpart
Loading required package: parallel
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GPLTR/best.tree.bootstrap.Rd_%03d_medium.png", width=480, height=480)
> ### Name: best.tree.bootstrap
> ### Title: parametric bootstrap on a pltr model
> ### Aliases: best.tree.bootstrap
> ### Keywords: documentation test
>
> ### ** 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:
> ##D ## build a maximal tree
> ##D
> ##D fit_pltr <- pltr.glm(data_pltr, Y.name, X.names, G.names,
> ##D args.rpart = args.rpart, family = family, iterMax = 5, iterMin = 3)
> ##D
> ##D ## select an test the selected tree by a parametric bootstrap procedure
> ##D args.parallel = list(numWorkers = 1, type = "PSOCK")
> ##D
> ##D best_bootstrap <- best.tree.bootstrap(fit_pltr$tree, data_pltr, Y.name, X.names,
> ##D G.names, B = 10, BB = 10, args.rpart = args.rpart, epsi = 0.001,
> ##D iterMax = 5, iterMin = 3, family = family, LEVEL = 0.05,LB = FALSE,
> ##D args.parallel = args.parallel)
> ##D
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>