pdConstruct.pdSRM: Construct pdSRM Object

View source: R/pdConstruct.pdSRM.R

pdConstruct.pdSRMR Documentation

Construct pdSRM Object

Description

Internal method called by pdConstruct to initialize a pdSRM object. Enforces the SRM constraint of equal actor variances, equal partner variances, and a single actor-partner covariance.

Usage

## S3 method for class 'pdSRM'
pdConstruct(
  object,
  value = numeric(0),
  form = stats::formula(object),
  nam = nlme::Names(object),
  data = sys.frame(sys.parent()),
  ...
)

Arguments

object

an object inheriting from pdSRM

value

an optional initialization value

form

an optional one-sided linear formula

nam

an optional vector of character strings

data

an optional data frame in which to evaluate the variables

...

optional arguments passed to other methods

Value

a pdSRM object representing the SRM positive-definite matrix

Examples


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
)


roundRobinR documentation built on Sept. 18, 2026, 1:06 a.m.