Skip to content

Commit

Permalink
cran prep
Browse files Browse the repository at this point in the history
  • Loading branch information
kkholst committed Jan 6, 2025
1 parent d3e2887 commit 6a0790d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion R/lava-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ NULL
##' starter.multigroup
##' addattr modelPar modelVar matrices pars pars.lvm
##' pars.lvmfit pars.glm score.glm procdata.lvmfit modelPar modelVar
##' matrices reorderdata graph2lvm igraph.lvm subgraph finalize
##' mat.lvm matrices reorderdata graph2lvm igraph.lvm subgraph finalize
##' index.lvm index.lvmfit index reindex index<-
##' rmvn0 dmvn0 logit expit tigol
##' randomslope randomslope<- lisrel variances offdiags describecoef
Expand Down
1 change: 1 addition & 0 deletions man/internal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/ksmooth2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions tests/testthat/test-influence.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ test_that("merge, IC, estimate with 'id' argument", {

l <- glm(y ~ x, data=d)
e1 <- estimate(l, id=d$id1)
e <- merge(estimate(l), estimate(l), id=list(d$id, d$id1))
V0 <- vcov(e)
V1 <- vcov(estimate(e1, id=c(1,2,2,3,4)))
V1 <- vcov(e1)
e0 <- estimate(e1, id=c(1,2,2,3,4))
V0 <- vcov(e0)

if (requireNamespace("geepack",quietly=TRUE)) {
V <- summary(geepack::geeglm(y ~ x, id=d$id0, data=d))$cov.scaled
testthat::expect_true(sum((V - V0)^2) < 1e-12)
testthat::expect_true(sum((V - V1)^2) < 1e-12)
}

testthat::expect_true(sum((vcov(e1) - vcov(e)[3:4,3:4])^2) < 1e-12)
testthat::expect_true(sum((V1 - vcov(e)[1:2,1:2])^2) < 1e-12)
e <- merge(estimate(l), estimate(l), id=list(d$id, d$id1))
testthat::expect_true(sum((V1 - vcov(e)[3:4,3:4])^2) < 1e-12)
testthat::expect_true(sum((V0 - vcov(e)[1:2,1:2])^2) < 1e-12)

ee <- estimate(e, id=c(1,2,3,4,2,2))
VV <- vcov(ee)
testthat::expect_true(sum((VV[1:2,1:2] - V)^2) < 1e-12)
testthat::expect_true(sum((VV[3:4,3:4] - V)^2) < 1e-12)
testthat::expect_true(sum((VV[1:2,1:2] - V0)^2) < 1e-12)
testthat::expect_true(sum((VV[3:4,3:4] - V0)^2) < 1e-12)
})

test_that("negative binomial regression (glm.nb)", {
Expand Down

0 comments on commit 6a0790d

Please sign in to comment.