sur_mean: Calculate the survey weighted mean of an object

View source: R/sur_mean.R

sur_meanR Documentation

Calculate the survey weighted mean of an object

Description

Calculate the survey weighted mean of an object

Calculate the mean from a normal survey

calculate the mean for a replicate survey

mean for a admin dataset

Usage

sur_mean(x, ...)

## Default S3 method:
sur_mean(x, na.rm = T, as_list = FALSE, sv, ids, st, ...)

## S3 method for class 'factor'
sur_mean(x, na.rm = T, as_list = FALSE, sv, ids, st, ...)

## S3 method for class 'character'
sur_mean(x, ...)

surdes_mean(x, ids, sv)

repdes_mean(x, ids, sv)

admin_mean(x)

Arguments

x

vector. Variable to compute a mean

...

unused

na.rm

logical. Determines whether NA values will be omitted from the analysis

as_list

logical. Determines whether the result should returned as a list– mostly for factors

sv

data.table. Survey vars data.table

ids

numeric. vector of indices to operate on

st

character. survey type


dcaseykc/dtsurvey documentation built on March 9, 2024, 1:09 p.m.