parse_longitudinal_data: An internal function to parse a list of STRAND data objects...

View source: R/parse_longitudinal_data.R

parse_longitudinal_dataR Documentation

An internal function to parse a list of STRAND data objects into a longitudinal object and then apply regression models.

Description

An internal function to parse a list of STRAND data objects into a longitudinal object and then apply regression models.

Usage

parse_longitudinal_data(
  data,
  block_regression,
  focal_regression,
  target_regression,
  dyad_regression
)

Arguments

data

A data objects of class STRAND, prepared using the make_strand_data() function. The data object must include all covariates used in the formulas of the fit_longitudinal_model function.

block_regression

A formula for the block-level predictors. This should be specified as in lm(), e.g.: ~ Ethnicity + Sex. Dont use interactions, however.

focal_regression

A formula for the predictors of out-degree (i.e., focal effects, or the effects of individual covariates on outgoing ties). This should be specified as in lm(), e.g.: ~ Age * Education

target_regression

A formula for the predictors of in-degree (i.e., target effects, or the effects of individual covariates on incoming ties). This should be specified as in lm(), e.g.: ~ Age * Education

dyad_regression

A formula for the predictors of dyadic relationships. This should be specified as in lm(), e.g.: ~ Kinship + Friendship

Value

A STRAND data object.


ctross/STRAND documentation built on Dec. 15, 2024, 6:02 a.m.