Skip to content

Commit

Permalink
Update simEGM.R
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexChristensen committed Oct 1, 2024
1 parent e746bef commit 3e7319a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions R/simEGM.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,7 @@ simEGM <- function(

# Populate cross-loading
loadings_matrix[start[i]:end[i], -i] <- loadings_matrix[start[i]:end[i], -i] +
(0.00 + rnorm_ziggurat(index_length) * cross.loadings) *
sample( # Probability of cross-loading being included is set by `log10(sample.size)`
c(0, 1), size = index_length, replace = TRUE, prob = c(sparsity, 1 - sparsity)
)
(0.00 + rnorm_ziggurat(index_length) * cross.loadings)
# rnorm(index_length, mean = 0.00, sd = cross.loadings)

# Set sparsity in cross-loadings
Expand Down

0 comments on commit 3e7319a

Please sign in to comment.