Skip to content

Commit

Permalink
comment about random init for pseudo-data
Browse files Browse the repository at this point in the history
  • Loading branch information
BioStatMatt committed Sep 25, 2020
1 parent 5452768 commit 6253260
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions squash.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ squash.matrix <- function(dat, alpha=1,
mmt <- compute_moments(dat)

## create inital pseudo data
## because the squashed data are not identifiable, and thus
## there is generally no global optimum of the objective function,
## random initialization here causes non-reproducible squashed
## data; TODO need a (more) deterministic version instead; might
## try Gaussian quadrature points that match the estimated mean
## and vcov of the full data
dat_m <- dat[sample(n, m),]

## store some info about the squashed data
Expand Down

0 comments on commit 6253260

Please sign in to comment.