This function creates a simple LMDI data frame that can be used for testing or examples.
It contains X
matrices for two fictitious countries (AB
and XY
)
and four years (1971-1974
).
Countries AB
and YZ
are identical for the purposes of illustration.
create_simple_LMDI()
a data frame of example LMDI data
#> Country Year X #> 1 AB 1971 1, 4, 10, 5, 2, 3 #> 2 AB 1972 4, 5, 5, 6, 3, 4 #> 3 AB 1973 8, 5, 2, 7, 4, 5 #> 4 AB 1974 10, 6, 1, 8, 5, 6 #> 5 YZ 1971 1, 4, 10, 5, 2, 3 #> 6 YZ 1972 4, 5, 5, 6, 3, 4 #> 7 YZ 1973 8, 5, 2, 7, 4, 5 #> 8 YZ 1974 10, 6, 1, 8, 5, 6DF$X[[1]]#> factor 1 factor 2 factor 3 #> subsubcat 1 1 10 2 #> subsubcat 2 4 5 3 #> attr(,"rowtype") #> [1] "subsubcat" #> attr(,"coltype") #> [1] "factor"