tests/testthat/_problems/test_ivregranks_vcov-251.R

# Extracted from test_ivregranks_vcov.R:251

# 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_increasing_FALSE.rda"))
res <- ivregranks(r(Y, increasing = FALSE) ~ r(X, increasing = FALSE) + W |
  r(Z, increasing = FALSE) + W, omega = 1)
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.