vhat | R Documentation |
Estimated variance of a total estimation, with strata
vhat(data, INDEX, weights, strata = NULL)
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 |
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.