View source: R/pdMatrix.pdSRM.R
| pdMatrix.pdSRM | R Documentation |
Internal method called by pdMatrix to reconstruct the
full covariance matrix from the three stored SRM parameters (actor SD,
partner SD, actor-partner correlation).
## S3 method for class 'pdSRM'
pdMatrix(object, factor = FALSE)
object |
an object inheriting from |
factor |
logical; if |
if factor is FALSE, the positive-definite matrix
represented by object; if TRUE, an upper triangular
Cholesky factor with a logDet attribute
d <- createDummies(
group.id = "groupId", act.id = "actId", part.id = "partId",
d = 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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.