2013-08-05 65 views
-4

我正在使用bnlearn軟件包中提供的gs函數。下面提供了dput(gs)R根據我們自己的需要修改程序

function (x, cluster = NULL, whitelist = NULL, blacklist = NULL, 
    test = NULL, alpha = 0.05, B = NULL, debug = FALSE, optimized = TRUE, 
    strict = FALSE, undirected = FALSE) 
{ 
    bnlearn(x = x, cluster = cluster, whitelist = whitelist, 
     blacklist = blacklist, test = test, alpha = alpha, B = B, 
     debug = debug, optimized = optimized, strict = strict, 
     undirected = undirected) 
} 

我想知道如何改變gs以適合我自己的需要。例如,我想將alpha的值從0.05增加到0.15。

+1

您可能需要閱讀[簡介R](http://www.cran.r-project.org/doc/manuals/R-intro.pdf)特別是第10節。 – Thomas

回答

4

這些只是默認值,因此您可以在不指定其他參數的情況下致電gs(x)。 要修改的α,簡單地做:

gs(x, alpha=0.15)