Uses a fitted vital model to interpolate missing values from a dataset.
Usage
# S3 method for class 'mdl_vtl_df'
interpolate(object, new_data, ...)
Examples
act_female <- aus_mortality |>
dplyr::filter(Code == "ACTOT", Sex == "female")
act_female |>
model(mean = FMEAN(Mortality)) |>
interpolate(act_female)
#> # A vital: 10,403 x 6 [1Y]
#> # Key: Age x (Sex, State, Code) [101 x 1]
#> Year Age Sex State Code Mortality
#> <int> <int> <chr> <chr> <chr> <dbl>
#> 1 1901 0 female Australian Capital Territory and Overseas… ACTOT 0
#> 2 1901 1 female Australian Capital Territory and Overseas… ACTOT 0
#> 3 1901 2 female Australian Capital Territory and Overseas… ACTOT 0
#> 4 1901 3 female Australian Capital Territory and Overseas… ACTOT 0
#> 5 1901 4 female Australian Capital Territory and Overseas… ACTOT 0
#> 6 1901 5 female Australian Capital Territory and Overseas… ACTOT 0
#> 7 1901 6 female Australian Capital Territory and Overseas… ACTOT 0
#> 8 1901 7 female Australian Capital Territory and Overseas… ACTOT 0
#> 9 1901 8 female Australian Capital Territory and Overseas… ACTOT 0
#> 10 1901 9 female Australian Capital Territory and Overseas… ACTOT 0
#> # ℹ 10,393 more rows