vcovgen: Estimate variance/covariance matrices using linear...

View source: R/vcovgen.R

vcovgenR Documentation

Estimate variance/covariance matrices using linear substitutes

Description

The function computes estimates of variance/covariance matrices for sampling with replacement at the first stage from a stratified sample, using the linear substitutes produced by geo_ratios. The function produces a list of estimated covariance matrices corresponding the geographic areas identified by geocode.

Usage

vcovgen(linear.subs, year.list, geocode, designvars)

Arguments

linear.subs

A data frame with linear substitutes for each Y variable, Year, and the variables with the names given by geocode and designvars.

year.list

A character or numeric vector of the years to include.

geocode

A character variable with the name of the geographic variable for which separate estimates are of interest.

designvars

A character vector of length 2, naming the strata and first-stage units.

Details

The function reformats the second element of the list output from geo_ratios in order to estimate covariances across time for each separate geographic area identified by the variable with the name indicated by geocode. It then calls functions from the survey package to estimate covariances.

See the example in geo_ratios.

Value

A list of estimated covariance matrices, sorted by the geographic names. The list may be used by eblupDyn or eblupRY, although many applications require the estimated variance/covariance matrices to be smoothed.

Author(s)

Robert E. Fay


sae2 documentation built on Aug. 23, 2023, 5:07 p.m.