getEligXWave: Returns a dataframe with flags x wave for Short Survey...

Description Usage Arguments Details Value Examples

Description

The function is used to determine analyses sets (viz., by 'getNetworkSet', 'makeTVTbl', 'getFixedCovs', and 'makeCCVec').

Usage

1
getEligXWave(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 numeric vector of School IDs to be included in the analysis.

Details

A sproc 'PInf1.dbo.StudentSIDInWave' in the SQL Server database PInf1 obtains eligible IDs. It is wapped by the function 'getSWNodes' in this package, called by the present function.

Value

A (#eligible SIDs x length(pWavVec)+1) dataframe. Col 1 is SID, Cols 2 on (each named 'wK', where K is the kth ordered wave in pWavVec) are flags with the integer 1 if individual SID was Short Survey (NetQ) eligible for that wave.

Examples

1
2
3
4
# Gets dataframe including SIDs for waves 1, 3, 4, and 5, schools 3-6 and
# 30 (one school district); each included SID was eligible for the Short
# survey at least once, and completed at least 1 survey in these waves.
EligXWave <- getEligXWave(c(1,3,4,5), c(3,4,5,6,30))

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