harvard-ufds / saeczi

Small Area Estimation for Continuous Zero Inflated data
https://harvard-ufds.github.io/saeczi/
Other
4 stars 2 forks source link

allow new levels #10

Closed joshyam-k closed 8 months ago

joshyam-k commented 8 months ago

what needs to be done to allow bootstrap to still produce an mse estimate for a small area that we have no sample data for:

area_random_errors needs to include all domain levels from the population data and it currently just includes the ones from the sample data: https://github.com/harvard-ufds/saeczi/blob/6e468872de3c36aff7ad8b34800aa60e3e2ebacb/R/unit_zi.R#L116-L123

joined_pop_bi$b_i is a vector which needs to be filled with 0 for all indices that belong to a domain not in the sample https://github.com/harvard-ufds/saeczi/blob/6e468872de3c36aff7ad8b34800aa60e3e2ebacb/R/unit_zi.R#L133

other sampling functions may also need to be tweaked slightly