View source: R/data_prep_dim.R
| add_dyad_individual_columns | R Documentation |
Adds Dyad-Individual Model (DIM) style dyad-mean and within-dyad
member-deviation columns for the predictors recorded in a dyadMLM_data
object. DIM requires one final exchangeable dyad composition, which may
result from pooling exchangeable compositions. Distinguishable dyads are
not currently supported. For intensive longitudinal predictors decomposed
by center_predictors(), raw
predictors and within-person components are decomposed within each dyad-time
occasion, while between-person components are decomposed once within each
dyad.
For raw predictors, the dyad-mean column is centered around the grand mean
of dyad means, or dyad-occasion means in longitudinal data, while the
within-dyad member-deviation column is the person's deviation from the
uncentered dyad mean.
Selected lag predictors additionally create lag-1 raw and within-person
dyad-mean and within-dyad member-deviation columns.
add_dyad_individual_columns(data)
data |
A |
The function reads attr(data, "dyadMLM")$temporal_decompositions and
stores the constructed DIM columns in
attr(data, "dyadMLM")$dim_predictors.
A dyadMLM_data object with dyad-mean and within-dyad
member-deviation predictor columns added and DIM predictor metadata
recorded.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.