tests/testthat/_problems/test_ivregranks_vcov-224.R

# Extracted from test_ivregranks_vcov.R:224

# setup ------------------------------------------------------------------------
library(testthat)
test_env <- simulate_test_env(package = "csranks", path = "..")
attach(test_env, warn.conflicts = FALSE)

# test -------------------------------------------------------------------------
load(test_path("testdata", "ivregranks_cov_sigmahat_covariates_TRUE.rda"))
res <- ivregranks(r(Y) ~ r(X) + W | r(Z) + W)
sigma2hat_ivregranks <- vcov(res)[2, 2] * n

Try the csranks package in your browser

Any scripts or data that you put into this service are public.

csranks documentation built on Aug. 21, 2026, 9:13 a.m.