tests/testthat/test_dynamics.R

context("Testing firm dynamics")

test_that("Firm dynamics with different methods", {
        list_test <- readRDS(system.file("extdata", "test_dynamics.rds", package = "dfvad"))
        df <- list_test[[1]]
        for (i in c("bhc", "gr", "fhk", "bg", "df", "mp")) {
                dym <- dynamics(df, "tfp", "share", "firm", "period", typ = i)
                i <- toupper(i)
                expect_equal(dym, list_test[[2]][[i]])
        }
})

Try the dfvad package in your browser

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

dfvad documentation built on Oct. 15, 2021, 5:16 p.m.