Skip to contents

Estimates the total population, including the unobserved population, using a specified hierarchical log-linear model.

Usage

estimate_population_fixed(
  zdat,
  model = NULL,
  nboot = 0,
  iseed = 1234,
  alpha = c(0.025, 0.1, 0.9, 0.975),
  return_details = FALSE
)

Arguments

zdat

A capture history data matrix with \(t+1\) columns, where \(t\) is the number of lists. The first \(t\) columns correspond to the capture lists and contain zeros and ones defining the observed capture histories. The final column contains the number of cases having each capture history. Capture histories not explicitly included in the data are assumed to have zero count.

model

A character string specifying a hierarchical log-linear model by its maximal interactions. For example, "[12,23]" specifies the hierarchical model generated by interactions 12 and 23, including all implied lower-order terms. If NULL, the main-effects model is used. The default is NULL.

nboot

Non-negative integer giving the number of bootstrap replications. If nboot = 0, only the point estimate and fitted model are returned and no bootstrap or jackknife calculations are performed. The default is 0.

iseed

Integer seed used to initialise the random-number generator when nboot > 0. The default is 1234.

alpha

Numeric vector of cumulative probability levels at which the endpoints of the BCa confidence intervals are to be calculated. This argument is used only when nboot > 0. The default is c(0.025, 0.1, 0.9, 0.975).

return_details

Logical. If TRUE, include the original-data GLM fit, bootstrap estimates, BCa acceleration, and effects estimated at minus infinity. The default is FALSE.

Value

A list with components:

input

A list containing the original call and data.

method

The character string "fixed".

estimate

A named numeric vector containing the estimated dark_figure and total population.

fitted_model

The hierarchy fitted to the original data.

masked_effects

Effects masked in the original data, whose reported coefficients are zero by convention. Always returned, including when return_details = FALSE.

uncertainty

A two-row matrix of BCa endpoints for the dark figure and total population when nboot > 0; otherwise an explanatory character string.

details

If return_details = TRUE, a list containing minus_infinity_effects, masked_effects, bootstrap_estimates, bootstrap_failed, bca_acceleration, and glm_fit. The last is the complete conditional GLM fit for the fixed model. Masked effects have conventional coefficient zero and are listed separately in masked_effects. Otherwise "not requested".

Details

Optional bootstrap and jackknife calculations provide BCa confidence intervals while fitting the same fixed model to every resampled data set.

The specified hierarchical model is fitted to the observed data. Parameter identifiability and existence of the extended MLE are checked for the original data and for every bootstrap and jackknife data set. Minimal zero-sufficient-statistic effects are represented at minus infinity by the fitting routine.

A masked interaction is a higher-order effect whose contribution cannot change any extended fitted mean because a lower-order effect is already estimated at minus infinity. For example, if lists A and B have no overlap then AB, if included in the model, is estimated at minus infinity. The interaction ABC is masked. Including ABC in the hierarchical model will not change the fitted mean of any history but will increase the number of nominal parameters, and so the BIC criterion cannot select this model.

If nboot > 0, multinomial bootstrap samples are generated from the observed capture history counts. The same fixed hierarchical model is fitted to every bootstrap sample. Unlike estimate_population_stepwise, there is no model-selection step within the bootstrap replications.

Bootstrap replications for which the fixed model cannot be fitted are omitted; their number is available as details$bootstrap_failed when return_details = TRUE. If the model cannot be fitted to any bootstrap sample, the routine stops with an error.

A delete-one jackknife calculation is also carried out to estimate the acceleration parameter required for the BCa confidence intervals. If the fixed model cannot be fitted after a positive-count deletion, the routine stops with an informative error.

A small positive value of nboot, such as that used in the example, is useful only for checking that the routine runs. A substantially larger number of bootstrap replications should be used for substantive inference.

References

Chan, L., Silverman, B. W., and Vincent, K. (2021). Multiple Systems Estimation for Sparse Capture Data: Inferential Challenges when there are Non-Overlapping Lists. Journal of the American Statistical Association, 116(535), 1297–1306. Available from https://www.tandfonline.com/doi/full/10.1080/01621459.2019.1708748.

DiCiccio, T. J. and Efron, B. (1996). Bootstrap Confidence Intervals. Statistical Science, 11(3), 189–228.

Examples

data(Korea)

# Main-effects model without bootstrapping
estimate_population_fixed(Korea)
#> $input
#> $input$call
#> estimate_population_fixed(zdat = Korea)
#> 
#> $input$data
#>      b c d Count
#> [1,] 0 0 1    41
#> [2,] 0 1 0     5
#> [3,] 1 0 0     5
#> [4,] 1 1 0    54
#> [5,] 1 0 1     6
#> [6,] 0 1 1     0
#> [7,] 1 1 1    12
#> 
#> 
#> $method
#> [1] "fixed"
#> 
#> $estimate
#> dark_figure       total 
#>    18.99265   141.99265 
#> 
#> $fitted_model
#> [1] "[1,2,3]"
#> 
#> $masked_effects
#> character(0)
#> 
#> $uncertainty
#> [1] "not calculated because nboot = 0"
#> 
#> $details
#> [1] "not requested"
#> 

# A fixed pairwise-interaction model using hierarchy notation
estimate_population_fixed(Korea, model = "[23,1]")
#> $input
#> $input$call
#> estimate_population_fixed(zdat = Korea, model = "[23,1]")
#> 
#> $input$data
#>      b c d Count
#> [1,] 0 0 1    41
#> [2,] 0 1 0     5
#> [3,] 1 0 0     5
#> [4,] 1 1 0    54
#> [5,] 1 0 1     6
#> [6,] 0 1 1     0
#> [7,] 1 1 1    12
#> 
#> 
#> $method
#> [1] "fixed"
#> 
#> $estimate
#> dark_figure       total 
#>    3.194444  126.194444 
#> 
#> $fitted_model
#> [1] "[23,1]"
#> 
#> $masked_effects
#> character(0)
#> 
#> $uncertainty
#> [1] "not calculated because nboot = 0"
#> 
#> $details
#> [1] "not requested"
#> 

# A very small number of bootstrap replications is used here only
# to keep the example quick.
estimate_population_fixed(
  Korea,
  model = "[23,1]",
  nboot = 2
)
#> $input
#> $input$call
#> estimate_population_fixed(zdat = Korea, model = "[23,1]", nboot = 2)
#> 
#> $input$data
#>      b c d Count
#> [1,] 0 0 1    41
#> [2,] 0 1 0     5
#> [3,] 1 0 0     5
#> [4,] 1 1 0    54
#> [5,] 1 0 1     6
#> [6,] 0 1 1     0
#> [7,] 1 1 1    12
#> 
#> 
#> $method
#> [1] "fixed"
#> 
#> $estimate
#> dark_figure       total 
#>    3.194444  126.194444 
#> 
#> $fitted_model
#> [1] "[23,1]"
#> 
#> $masked_effects
#> character(0)
#> 
#> $uncertainty
#>                  0.025        0.1        0.9      0.975
#> dark_figure   3.082192   3.082192   3.616438   3.616438
#> total       126.082192 126.082192 126.616438 126.616438
#> 
#> $details
#> [1] "not requested"
#>