makeCCVec: Returns a list of vectors representing RSiena composition...

Description Usage Arguments Details Value Examples

Description

The output of this function may be input directly to the RSiena function 'sienaCompositionChange'.

Usage

1
makeCCVec(pElig)

Arguments

pElig

An n x 1+w dataframe, with 1 row for every SID who was *survey-eligible* for any of the waves of interest, and 1 col for each wave, containing 1 if the SID was survey-eligible that wave, and 0 if not (col 1 is SID).

Details

The input dataframe must be the object returned by 'getEligXWave', or the equivalent.

Value

A list with n elements (one for each row of the inut DF). Each element is a vector of pairs of arrival and departure times from the network, as explained in the RSiena manual under 'method of changing composition'.

Examples

1
2
3
4
# Returns a list of composition change vectors for the SIDs
# in waves 1, 3, and 4, and schools 3, 4, 5, 6, and 30.
ccDF <- makeCCVec(getEligXWave(pWavVec = c(1,3,4),
    pSchVec = c(3,4,5,6,30)))

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