vhat: Estimated variance of a total estimation, with strata

View source: R/vhat.R

vhatR Documentation

Estimated variance of a total estimation, with strata

Description

Estimated variance of a total estimation, with strata

Usage

vhat(data, INDEX, weights, strata = NULL)

Arguments

data

a data frame of individual data. In this version, data should be the complete dataset of the sample.

INDEX

a right hand formula whose result is a logical vector that indicates the observations for which the variance has to be estimated (see the examples below)

weights

character string with the name of the column of weights

strata

character string with the name of the column that contains the strata

Examples

str(d)

# Without strata (strata = NULL by default)
vhat(d, INDEX = ~ xcat == "cat1", weights = "w")

# With strata (column "s")
vhat(d, INDEX = ~ xcat == "cat1", weights = "w", strata = "s")


gibonet/vhatbfs documentation built on Sept. 14, 2024, 7:53 a.m.