View source: R/data_prep_dsm.R
| add_dyadic_score_columns | R Documentation |
Adds Dyadic Score Model (DSM) dyad-mean and signed dyad-difference columns
for the predictors recorded in a dyadMLM_data object, together with a
DSM role contrast coded +0.5 and -0.5. DSM differences follow the role
order recorded in attr(data, "dyadMLM")$dsm_role_order. The supported DSM
structure contains one distinguishable dyad composition; exchangeable dyads
and multiple compositions are not supported.
add_dyadic_score_columns(data)
data |
A |
For ILD predictors, raw and within-person scores are computed within dyad-time and between-person scores within dyad. Raw dyad means are grand-mean centered. Both partners' predictor values are required for each score pair. Selected lag predictors additionally create lag-1 raw and within-person dyad-mean and signed-difference columns.
Constructed predictor columns are recorded in
attr(data, "dyadMLM")$dsm_predictors, and the contrast column name is
recorded in attr(data, "dyadMLM")$dsm_role_contrast_column.
A dyadMLM_data object with dyad-mean and signed dyad-difference
predictor columns and a DSM role contrast added.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.