make_longitudinal_data: An internal function to make a longitudinal data object using...

View source: R/make_longitudinal_data.R

make_longitudinal_dataR Documentation

An internal function to make a longitudinal data object using the STRAND framework

Description

An internal function to make a longitudinal data object using the STRAND framework

Usage

make_longitudinal_data(
  long_data,
  block_regression,
  focal_regression,
  target_regression,
  dyad_regression
)

Arguments

long_data

A list of data objects of class STRAND prepared using the make_strand_data() function. The data objects must include all covariates used in the formulas listed below.

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.

Examples

## Not run: 
fit = make_longitudinal_data(long_data,
                             block_regression = ~ Ethnicity,
                             focal_regression = ~ Age * NoFood,
                             target_regression = ~ Age * NoFood,
                             dyad_regression = ~ Relatedness + Friends * SameSex
                              )

## End(Not run)


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