mergeObj: merges eNetXplorer objects with different alphas

Description Usage Arguments Author(s) See Also Examples

View source: R/mergeObj.R

Description

Upon sequential or parallel execution of two or more eNetXplorer runs with different values of the mixing parameter alpha, and assuming the objects from those runs have been saved, this function creates a new eNetXplorer object that merges the alpha values. It currently supports linear (gaussian), logistic (binomial), and Cox regression models.

Usage

1
2
mergeObj(source_obj, source_dir=getwd(), dest_obj="eNet_merged.Robj",
dest_dir=NULL)

Arguments

source_obj

Vector with the names of two or more eNetXplorer objects.

source_dir

Source directory. Default is the working directory.

dest_obj

Name of the merged eNetXplorer object.

dest_dir

Destination directory. If not specified, it will use source_dir as default.

Author(s)

Julian Candia and John S. Tsang
Maintainer: Julian Candia julian.candia@nih.gov

See Also

eNetXplorer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# we first generate two objects over different alpha values, then merge them.
data(QuickStartEx)
working_dir = tempdir()
fit1 = eNetXplorer(x=QuickStartEx$predictor,y=QuickStartEx$response,
family="gaussian",alpha=seq(0,1,by=0.2),save_obj=TRUE,dest_dir=working_dir,
dest_obj="eNet1.Robj",n_run=20,n_perm_null=10,seed=111)
fit2 = eNetXplorer(x=QuickStartEx$predictor,y=QuickStartEx$response,
family="gaussian",alpha=seq(0.1,0.9,by=0.2),save_obj=TRUE,dest_dir=working_dir,
dest_obj="eNet2.Robj",n_run=20,n_perm_null=10,seed=111)
mergeObj(source_obj=c("eNet1.Robj","eNet2.Robj"),source_dir=working_dir)

# we generate summary PDFs to compare the results before and after merging.
summaryPDF(fit1, dest_file="eNet1.pdf",dest_dir=working_dir)
summaryPDF(fit2, dest_file="eNet2.pdf",dest_dir=working_dir)
load(file.path(working_dir,"eNet_merged.Robj"))
summaryPDF(eNet,dest_file="eNet_merged.pdf",dest_dir=working_dir)

eNetXplorer documentation built on Aug. 30, 2020, 1:06 a.m.