counties {robsurvey}R Documentation

Data on a Simple Random Sample of 100 Counties in the U.S.

Description

Data from a simple random sample (without replacement) of 100 of the 3141 counties in the United Stated (U.S. Bureau of the Census, 1994).

Usage

data(counties)

Format

A data.frame with 100 observations on the following variables:

state

state, [character].

county

county, [character].

landarea

land area, 1990 (square miles), [double].

totpop

population total, 1992, [double].

unemp

number of unemployed persons, 1991, [double].

farmpop

farm population, 1990, [double].

numfarm

number of farms, 1987, [double].

farmacre

acreage in farms, 1987, [double].

weights

sampling weight, [double].

fpc

finite population corretion, [double].

Details

The data (and 10 additional variables) are published in Lohr (1999, Appendix C).

Source

Lohr, S. L. (1999). Sampling: Design and Analysis, Pacific Grove (CA): Duxbury Press.

Examples

head(counties)

library(survey)
# Survey design for simple random sampling without replacement
dn <- if (packageVersion("survey") >= "4.2") {
        # survey design with pre-calibrated weights
        svydesign(ids = ~1, fpc = ~fpc, weights = ~weights, data = counties,
                  calibrate.formula = ~1)
    } else {
        # legacy mode
        svydesign(ids = ~1, fpc = ~fpc, weights = ~weights, data = counties)
    }

[Package robsurvey version 0.6 Index]