metrics | R Documentation |
calc
List of available metric for calc
metrics()
total: Count of people with the given value. Mostly relevant for surveys (where total is approximately mean * sum(pweights)). Returns total, total_se, total_upper, total_lower. total_se, total_upper, & total_lower are only valid for survey data. Default ci (e.g. upper and lower) is 95 percent.
mean: Average response and associated metrics of uncertainty. Returns mean, mean_se, mean_lower, mean_upper. Default ci (e.g. upper and lower) is 95 percent.
rse: Relative standard error. 100*se/mean.
numerator: Sum of non-NA values for 'what“. The numerator is always unweighted.
denominator: Number of rows where what
is not NA.
The denominator is always unweighted.
obs: Number of unique observations (i.e., rows), agnostic as to whether
there is missing data for what
. The obs is always unweighted.
median: The median non NA response. Not populated when what
is a factor
or character. Even for surveys, the median is the unweighted result.
unique.time: Number of unique time points (from time_var
) included in
each tabulation (i.e., number of unique time points when the what
is not missing).
missing: Number of rows in a given grouping with an NA value for what
.
missing + denominator = Number of people in a given group.
When what
is a factor/character, the missing information is provided for the other.
missing.prop: The proportion of the data that has an NA value for what
.
rate: mean * per. Provides rescaled mean estimates (i.e., per 100 or per 100,0000). Returns rate, rate_se, rate_lower, rate_upper. Default ci (e.g. upper and lower) is 95 percent.
ndistinct: The unique number of what
values in the given subset. For factors, it is the unique number of levels in the subset.
character vector. A vector of the available metrics for calc
print(metrics())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.