| datainfo | R Documentation |
Computes summary statistics on the number of sampled observations, events, and unique clusters at national, admin1, and admin2 levels. The function merges the input dataset with cluster- and admin-level metadata and returns counts of samples, events, and clusters per geographic unit.
datainfo(data, cluster.info, admin.info1 = NULL, admin.info2 = NULL)
data |
A data frame containing at least the variables |
cluster.info |
A list containing the element |
admin.info1 |
A list containing the element |
admin.info2 |
A list containing the element |
The function performs left and right joins to associate each observation
in data with its cluster and administrative region. It removes rows
with missing values before summarizing. For each administrative level:
n_samples: number of non-missing observations.
n_events: number of cases where value == 1.
n_clusters: number of distinct survey clusters.
If admin.info1 or admin.info2 is NULL, the corresponding
summaries are omitted.
A list with up to three data frames:
summary.ad0National-level totals across all clusters.
summary.ad1Admin1-level summaries (if admin.info1 provided).
summary.ad2Admin2-level summaries (if admin.info2 provided).
## Not run:
datainfo(
data = data,
cluster.info = cluster.info,
admin.info1 = admin.info1,
admin.info2 = admin.info2
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.