View source: R/make_longitudinal_data.R
make_longitudinal_data | R Documentation |
An internal function to make a longitudinal data object using the STRAND framework
make_longitudinal_data(
long_data,
block_regression,
focal_regression,
target_regression,
dyad_regression
)
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 |
A STRAND data object.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.