tests/testthat/_problems/test_ivregranks_vcov-43.R

# Extracted from test_ivregranks_vcov.R:43

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

# test -------------------------------------------------------------------------
w <- cbind(mtcars$qsec, mtcars$qsec)
model <- expect_warning(ivregranks(r(mpg) ~ r(hp) + w | r(disp) + w, data = mtcars), "collinear")
cov2 <- vcov(model, component = "stage2")

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.