Skip to content

Add a spatial covariance structure implementing patient level random effects induced covariance #480

Open
@danielinteractive

Description

@danielinteractive

As a step towards supporting random effects in this package, the first simplest step could be to support a spatial covariance structure which provides a patient level random effects induced covariance structure.

The syntax could be sp_ref(cov1, cov2, ... | group / subject) where cov1 is the first covariate to use (potentially a factor which leads to multiple design matrix columns), etc.

This will be possible because we can marginalize over the random coefficients in closed form, such that the induced covariance matrix for the $i$th patient is a quadratic form like $Z_i \Sigma_r Z_i^\top + \sigma^2 I$ when the residuals are homoskedastic with variance $\sigma^2$ and $Z_i$ is the design matrix induced by the specified covariates and $\Sigma_r$ is the covariance matrix of the random coefficients. Here $\sigma^2$ and $\Sigma_r$ can be estimated as variance parameters from the data. For the beginning we could just assume an unstructured covariance model for $\Sigma_r$

As long as we only have subject level random effects, then the overall covariance matrix is still blockdiagonal with these entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Issue To start

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions