Skip to content

Commit

Permalink
weighted jackknife addons
Browse files Browse the repository at this point in the history
  • Loading branch information
pievos101 committed Apr 6, 2018
1 parent 200093b commit 133acd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/GENOME.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ RNDmin = "matrix",
D.z = "matrix", # introgression slots
D.pval = "matrix",
BDF.z = "matrix", # introgression slots
BDF.pval = "matrix",
BDF.pval = "matrix",
BDF.SE = "matrix",
jack.knife = "logical",
missing.freqs = "matrix",

Expand Down
2 changes: 2 additions & 0 deletions R/weighted.jackknife.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if(per.region){ #drop-one jackknife
D.pval <- matrix(NaN,n.region.names,1) # jacknife
BDF.z <- matrix(NaN,n.region.names,1) # jacknife
BDF.pval <- matrix(NaN,n.region.names,1) # jacknife
BDF.SE <- matrix(NaN,n.region.names,1) # jacknife

# get site specific values
site.D <- object@region.stats@D
Expand Down Expand Up @@ -149,6 +150,7 @@ object@BDF.z <- as.matrix(BDF/SE_BDF)
object@BDF.pval <- as.matrix(2*pnorm(-abs(object@BDF.z)))
object@D.z <- as.matrix(D/SE_D)
object@D.pval <- as.matrix(2*pnorm(-abs(object@D.z)))
object@BDF.SE <- as.matrix(SE_BDF)

return(object)

Expand Down

0 comments on commit 133acd7

Please sign in to comment.