Nothing
testthat::context("Risk regression")
set.seed(1)
m <- lava::lvm(a[-2] ~ 1*x+z,
linpred.target[1] ~ 1,
linpred.nuisance[-1] ~ 2*x+z)
lava::distribution(m,~a) <- lava::binomial.lvm("logit")
m <- lava::binomial.rr(m, "y","a","linpred.target","linpred.nuisance")
d <- lava::sim(m,1e3)
testthat::test_that("MLE convergence", {
fit <- targeted::riskreg(y ~ a | 1 | x+z | 1, data=d, type="rr")
influ <- lava::IC(fit)
val <- colMeans(influ)^2
testthat::expect_true(val<1e-3)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.