getNQTVCs: Returns a data.table of Short-Survey time-varying covariates

Description Usage Arguments Value Examples

Description

This is generally used to pull this data from the database, and subsequently subset it for a particular Analysis Set. It is currently used by 'makeTVTbl'.

Usage

1
getNQTVCs(pWavVec, pSchVec)

Arguments

pWavVec

An ordered numeric vector of wave SIDs to be included in the analysis. Waves 2, 6, and 10 are summer waves; no Short Survey or Long Survey data were collected. Hence these waves should not ever be specified.

pSchVec

A vector of (integer) School IDs.

Value

A dataframe that is a subset of the database table 'PInf.dbo.SWave'., containing only the items asked on the 'Short Survey'. Column names fairly accurately describe column contents, but one should consult the qq codebook for precise definition.

Examples

1
2
3
4
# Gets a long-form data.table (each row represents an individual and a wave)
# of survey data from the 'Short Survey', for
# waves 1, 3, and 4, schools 3:6 and 30 (one school district).
tvcs <- getNQTVCs(c(1, 3, 4), c(3, 4, 5, 6, 30))

johninpdx/RSTools documentation built on May 19, 2019, 5:15 p.m.