count_indices {robust2sls}R Documentation

Counts the number of times each index was sampled

Description

count_indices takes a list of indices for resampling and counts how often each index was sampled in each resample. The result is returned in two versions of a matrix where each row corresponds to a different resample and each column to one index.

Usage

count_indices(resamples, indices)

Arguments

resamples

A list of resamples, as created by nonparametric.

indices

The vector of original indices from which the resamples were drawn.

Value

count_indices returns a list with two names elements. Each element is a matrix that stores how often each observation/index was resampled (column) for each resample (row). $count_clean only has columns for observations that were available in the indices. $count_all counts the occurrence of all indices in the range of indices that were provided, even if the index was actually not available in the given indices. These are of course zero since they were not available for resampling. If the given indices do not skip any numbers, the two coincide.


[Package robust2sls version 0.2.2 Index]