Skip to content

Commit

Permalink
Merge pull request #127 from falkcarl/master
Browse files Browse the repository at this point in the history
Sample size calculations under two-stage estimation with missing data
  • Loading branch information
SachaEpskamp committed Feb 21, 2024
2 parents 8ac9319 + 91b48d5 commit c5158f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/defaultFunctions.R
Expand Up @@ -37,11 +37,11 @@ sampleSize_pairwise <- function(data, type = c( "pairwise_average","maximum","mi
misMatrix <- t(xmat) %*% xmat

if (type == "pairwise_maximum"){
sampleSize <- max(misMatrix)
sampleSize <- max(misMatrix[lower.tri(misMatrix)])
} else if (type == "pairwise_minimum"){
sampleSize <- min(misMatrix)
sampleSize <- min(misMatrix[lower.tri(misMatrix)])
} else if (type == "pairwise_average"){
sampleSize <- mean(misMatrix)
sampleSize <- mean(misMatrix[lower.tri(misMatrix)])
}


Expand Down

0 comments on commit c5158f4

Please sign in to comment.