| srm_var_pct | R Documentation |
Extracts and formats the variance components and reciprocity correlations
from an lme object fitted with the
pdSRM covariance structure. Returns group, actor, partner,
and dyadic (relationship) variances as both raw values and percentages of
total variance, along with generalized reciprocity (actor-partner
correlation) and dyadic reciprocity.
srm_var_pct(object)
object |
an |
a data.frame with two columns and six rows:
variances.and.covariancesGroup, Actor, Partner, and Dyad variances; Generalized Reciprocity covariance; Dyadic Reciprocity covariance
percents.and.correlationsvariance percentages for the four components; Generalized Reciprocity correlation; Dyadic Reciprocity correlation
Kenny, D. A., Kashy, D. A., & Cook, W. L. (2006). Dyadic Data Analysis. Guilford Press.
d <- create_dummies(
group_id = "groupId", act_id = "actId", part_id = "partId",
data = sampleDyadData[sampleDyadData$timeId == 1, ],
merge_original = TRUE
)
o <- nlme::lme(
liking ~ 1,
random = list(groupId = nlme::pdBlocked(list(
nlme::pdIdent(~1),
pdSRM(~ -1 + a1 + a2 + a3 + a4 + p1 + p2 + p3 + p4)
))),
correlation = nlme::corCompSymm(form = ~1 | groupId / pdSRM_dyad_id),
data = d,
na.action = stats::na.omit
)
srm_var_pct(o)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.