2017-02-02 27 views
1

任何人使用Metagear進行大型meta分析數據篩選?Metagear的effort_redistribute無法讓它做我想做的事

我想重新分配2個審閱者的大數據集的1%,到新的reviwer。可以很容易地重新分配50:50,嘗試使用努力=但不斷獲取錯誤的字符串參數(是99,1,0)還是(98,1,1)等。使用小插曲代碼和示例數據集進行測試,並獲得以下內容。 ...

# load package 
    library(metagear) 

    # load a bibliographic dataset with the authors, titles, and abstracts of multiple study references 
    data(example_references_metagear) 

    #initialise refs 
    theRefs <- effort_initialize(example_references_metagear) 

    # randomly distribute screening effort to a team, but with Luc handeling  80% of the work 
    theTeam <- c("Christina", "Luc") 
    theRefs_unscreened <- effort_distribute(theRefs, reviewers = theTeam, effort = c(20, 80)) 

    #results in christina with 2 papers, luc with 9 

    #give a small amount of work to new reviewer, patsy 
    theRefs_Patsy <- effort_redistribute(theRefs_unscreened, 
           reviewer = "Luc", 
           remove_effort = "20", # move 20% of Luc's work to Patsy 
           reviewers = c("Luc", "Patsy")) # team members loosing and picking 

    #results in christina with the same 2 papers, luc with 5 and patsy with 4 
    #shouldn't end up with chris 2, luc with 8, patsy with 2? 

回答

0

運行代碼,你給它上面會給你以下錯誤

Error in remove_effort/(number_reviewers - 1) : 
    non-numeric argument to binary operator 

因爲effort_redistribute需要一個數字參數。從您的百分比左右刪除引號「」將解決您使用暈影代碼和示例數據集時遇到的問題。你最終會得到克里斯蒂娜2,帕齊2,和呂克7(共11)。

從我對您的問題的理解中可以看出,您有一個已經在2位評論者之間分發的大型數據集。

# load package 
library(metagear) 

# load a bibliographic dataset with the authors, titles, and abstracts of multiple study references 
data(your_large_dataset) 

#initialise refs 
theRefs <- effort_initialize(your_large_dataset) 

# randomly distribute screening effort to a team, with Reviewer1 and Reviewer2 equally sharing the work. 
OriginalTeam <- c("Reviewer1", "Reviewer2") 
theRefs_unscreened <- effort_distribute(theRefs, reviewers = OriginalTeam) 

到目前爲止,我們有裁判Reviewer1和Reviewer2之間劃分50:50:你會使用類似於此代碼最初發布的數據集。

現在,如果您想使用effort_redistribute將1%的努力分配給新審閱者,則必須選擇要分配哪些人的工作,審閱者1或審閱者2。在這個例子中,我將從Reviewer1中移除。

theRefs_New <- effort_redistribute(theRefs_unscreened, 
           reviewer = "Reviewer1", 
           remove_effort = 1, # move 1% of Reviewer1's work to new reviewer, Reviewer3 
           reviewers = c("Reviewer1", "Reviewer3")) # team members loosing and picking up work 

這樣,您將結束與Reviewer1,Reviewer2和Reviewer3分別爲49%,50%和努力的1%。 或者,如果您希望從每個Reviewer1和Reviewer2中刪除0.5%的工作量以使Reviewer 3總共花費1%的努力,則可以連續兩次使用effort_redistribute,將每個原始評估的0.5%移動並將其分配給新的一。

當您使用effort_distribute時,根本不需要重新分配,並且從開始分配努力98:1:1(或者其他情況下您想要的)。請記住,爲了使其起作用,描述爲reviewers的矢量和描述爲effort的矢量應該具有相同的長度。

reviewers:將承擔額外工作的每個團隊成員的姓名向量。

effort:用於在每個團隊成員之間分配篩選任務的百分比向量。當不明確呼叫時,假設努力在所有成員之間平均分配。長度必須與團隊成員數量相同,也可以爲100.

Team_vector <- c("Reviewer1", "Reviewer2", "Reviewer3") 
Effort_vector <- c(98, 1, 1) 
theRefs_distributed <- effort_distribute(theRefs, reviewers = OriginalTeam, effort = Effort_vector) 
相關問題