Skip to content

Commit

Permalink
Added Sampling of Proportions
Browse files Browse the repository at this point in the history
Before the change, the first distribution always was the smallest. Adding a sample() makes it possible for each distribution to be the largest.
  • Loading branch information
sbeck committed Apr 17, 2018
1 parent 17c6be6 commit 8c06005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/simulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ createValidationData <- function(params = newParams(),verbose = TRUE){
combs <- do.call('rbind',combsSorted)
uniqueCombs <- unique.array(combs)
sampleProp <- sample(1:nrow(uniqueCombs),1,replace = FALSE)
ranProps <- uniqueCombs[sampleProp,]
ranProps <- sample(uniqueCombs[sampleProp,])

ranSd<- unlist(lapply(2:modality,function(i){
eval(parse(text = paste(paste0("ranSd",i),
Expand Down

0 comments on commit 8c06005

Please sign in to comment.