makeSAOMNet: Returns a longitudinal 'sienaNet' object directly from...

Description Usage Arguments Value Examples

Description

This function is a very thin wrapper for RSiena::sienaDependent (or equivalently, 'sienaNet'), saving maybe half a line of code. It takes the output from 'getNetworkSet' with no additional parameters or modification (BUT the networks included in that output must be of class dgTSparse), and creates a longitudinal network dependent variable object from it, using whatever networks it is given (w of them).The last element of the 'getNetworkSet' function output, a vector of the SIDs included in the analysis set, is ignored.

Usage

1
makeSAOMNet(pNetInput)

Arguments

pNetInput

The list of length (w+1) generated by 'getNetworkSet', where the first w elements *must be* class dgTSparse networks.

Value

A 'sienaNet' object, ready to be used as an endogenous network variable in a SAOM.

Examples

1
2
3
4
# 'net' will be a 'sienaNet' network dependent variable:
  net <- makeSAOMNet(getNetworkSet(pWavVec = c(1,3,4),
    pSchVec = c(3, 4, 5, 6, 30),
    pElig = 2, pDid = 2, pTyp = "BF", pOut = "SP", pS0 = "S0"))

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