Description Usage Arguments Value References Examples
View source: R/compute_all_tests.R
This functions computes pvalues frm
score tests of genetic pathway risk association in 5 different models
1 2 3 
data 
a

ind_gene 
columns indices of genes in the pathway of interest. Default is 
num_perts 
number of perturbations used. Default is 
Ws 
optional inputed perturbations, should be a vector of length 
rho 
a vector of rhos, such as one found created from the range returned by 
kernel 
a character string indicating which kernel is used. Possible values (currently implemented) are

d 
if 
pca_thres 
a number between 
get_ptb_pvals 
a logical flag indicating whether perturbed pvalues should be returned
as part of the results. Default is 
... 
extra parameters to be passed to a userdefined kernel. 
either a vector
of pvalues for 5 different models with names:
"SCR"
: SemiCompeting Risks
"PFS"
: Progression Free Survival
"CR"
: Competing Risks
"OS"
: Overall Survival
"SCR_alt"
: SCR allowing different tuning parameters for the two event time processes
or else if get_ptb_pvals
is TRUE
, a list
with 2 elements:
"obs_pvals"
: a vector containing the observed pvalues for each of the 5 models as described above
"null_pvals_perts"
: a matrix of dimensions num_perts x 5
containing the corresponding
perturbed pvalues
Neykov M, Hejblum BP, Sinnot JA, Kernel Machine Score Test for Pathway Analysis in the Presence of SemiCompeting Risks, submitted, 2016.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29  ## First generate some Data
feat_m_fun < function(X){
sin(X[,1]+X[,2]^2)1
}
feat_d_fun < function(X){
(X[,4]X[,5])^2/8
}
mydata < sim_SCR_data(data_size = 400, ncol_gene_mat = 20, feat_m = feat_m_fun,
feat_d = feat_d_fun, mu_cen = 40, cov=0.5)
#initial range
ind_gene < c(7:ncol(mydata))
my_rho_init < seq(0.01, 20, length=300)*length(ind_gene)
range(my_rho_init)
if(interactive()){
# compute the interval for rho
rho_set < findRhoInterval(tZ=t(mydata[,ind_gene]), rho_init = my_rho_init, kernel="gaussian")
rho_set
range(my_rho_init) # good to check that the interval produced here is strictly contained in rho_init
# otherwise, expand rho.init and rerun
rhos < exp(seq(log(rho_set[1]),log(rho_set[2]), length=50))
# run the tests with Gaussian kernel
compute_all_tests(data = mydata, num_perts=1000, rho=rhos, kernel="gaussian")
# run the tests with linear kernel
compute_all_tests(data=mydata, num_perts=1000, kernel="linear")
}

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.