Gamma.fromCTM | R Documentation |
Calculates the stationary covariance matrix (Gamma) from the continuous-time (un)standardized lagged effects matrix (Drift) and residual covariance matrix (Sigma). There is also an interactive web application on my website: Standardizing and/or transforming lagged regression estimates (https://www.uu.nl/staff/RMKuiper/Websites%20%2F%20Shiny%20apps).
Gamma.fromCTM(Drift, Sigma)
Drift |
(Un)standardized lagged effects matrix of the first-order continuous-time (CT-VAR(1)) model. It also takes a fitted object from the class "ctsemFit" (from the ctFit() function in the ctsem package); see example below. From such an object, the Drift and Sigma matrices are extracted. |
Sigma |
Residual covariance matrix of the first-order continuous-time (CT-VAR(1)) model, that is, the diffusion matrix. |
This function returns the stationary covariance matrix, that is, the contemporaneous covariance matrix of the data.
# library(CTmeta)
## Example 1 ##
#
Drift <- myDrift
#
q <- dim(Drift)[1]
Sigma <- diag(q) # for ease
#
Gamma.fromCTM(Drift, Sigma)
## Example 2: input from fitted object of class "ctsemFit" ##
#
#data <- myData
#if (!require("ctsemFit")) install.packages("ctsemFit")
#library(ctsemFit)
#out_CTM <- ctFit(...)
#Gamma.fromCTM(out_CTM)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.