Skip to content

Commit

Permalink
increase sample size in test
Browse files Browse the repository at this point in the history
  • Loading branch information
haziqj committed May 29, 2024
1 parent f6f198e commit 13babac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions R/40-lav_export_INLA.R
Original file line number Diff line number Diff line change
Expand Up @@ -1383,9 +1383,7 @@ coeffun_inla <- function(

samps <- apply(samps, 1, simplify = FALSE, \(x) {
psi <- exp(x[seq_along(idx_psi)])
u <- exp(-x[length(idx_psi) + seq_along(idx_lvrho)])
u <- 1 / (1 + u)
lvrho <- 2 * u - 1
lvrho <- theta_to_rho(x[length(idx_psi) + seq_along(idx_lvrho)])

SD <- Diagonal(x = sqrt(psi))
Rho_df <- pxpartable[pxpartable$mat == "lvrho", ]
Expand Down Expand Up @@ -1457,9 +1455,7 @@ coeffun_inla <- function(

samps <- apply(samps, 1, simplify = FALSE, \(x) {
theta_e <- exp(x[seq_along(idx_theta)])
u <- exp(-x[length(idx_theta) + seq_along(idx_rho)])
u <- 1 / (1 + u)
rho <- 2 * u - 1
rho <- theta_to_rho(x[length(idx_theta) + seq_along(idx_rho)])

SD <- Diagonal(x = sqrt(theta_e))
Rho_df <- pxpartable[pxpartable$mat == "rho", ]
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-models.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ test_that("CFA", {
eta1 =~ y1 + y2 + y3
eta2 =~ y4 + y5 + y6
"
dat <- lavaan::simulateData(mod, sample.nobs = 100)
dat <- lavaan::simulateData(mod, sample.nobs = 1000)
expect_no_error({
fit <- icfa(
model = mod,
data = dat,
meanstructure = FALSE,
verbose = FALSE,
npost = 10
npost = 100
)
})
})
Expand Down

0 comments on commit 13babac

Please sign in to comment.