inst/tinytest/test_mi_methods.R

source("_code_for_all_.R")

# checking methods --------------------------------------------------------

expect_error(
  nonprob(
    outcome = single_shift~region + private + nace + size,
    pop_totals = pop_totals,
    method_outcome = "nn",
    data = admin)
)

expect_error(
  nonprob(
    outcome = single_shift~region + private + nace + size,
    pop_totals = pop_totals,
    method_outcome = "pmm",
    data = admin)
)

expect_error(
  nonprob(
    outcome = single_shift~region + private + nace + size,
    pop_totals = pop_totals,
    method_outcome = "npar",
    data = admin)
)

Try the nonprobsvy package in your browser

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

nonprobsvy documentation built on April 3, 2025, 7:08 p.m.