create.Tau2: Create a variance component of the heterogeneity of the...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/osmasem.R

Description

It creates variance component of the heterogeneity of the random effects by decomposing the variance component into matrices of correlation and standard deviations.

Usage

1
2
3
4
create.Tau2(RAM, no.var, Tau1.labels=seq(no.var),
            RE.type = c("Diag", "Symm", "Zero", "User"),
            RE.User=NULL, Transform = c("expLog", "sqSD"),
            RE.startvalues=0.05)

Arguments

RAM

The RAM model for testing. no.var is calculated from it.

no.var

If RAM is missing, the user has to specify the no.var argument. It represents the no.var by no.var of the random effects).

Tau1.labels

Parameter labels in Tau1. The default is Tau1_1, Tau1_2, etc.

RE.type

Either "Diag", "Symm", "Zero" or "User". If it is"Diag" (the default if missing), a diagonal matrix is used for the random effects meaning that the random effects are independent. If it is "Symm", a symmetric matrix is used for the random effects on the covariances among the correlation (or covariance) vectors. If it is "Zero", a zero matrix is assumed on the variance component of the random effects. If it is "User", users have to specify the RE.true argument.

RE.User

It represents the no.var by no.var symmetric matrix of TRUE or FALSE for the variance component. If the elements are FALSE, they are fixed at 0.

Transform

Either "expLog" or "sqSD". If it is "expLog", the variances are estimated by applying a log and exp transformation. If it is "sqSD", the variances are estimated by applying a square on the SD. The transformation may improve the estimation when the heterogeneity is small or close to zero.

RE.startvalues

Starting values for the variances.

Value

A list of MxMatrix-class. The variance component is computed in Tau2.

Author(s)

Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>

See Also

osmasem, create.V, create.vechsR

Examples

1
2
3
4
5
6
7
8
## Not run: 
T0 <- create.Tau2(no.var=4, RE.type="Diag", Transform="expLog", RE.startvalues=0.05)
T0

T1 <- create.Tau2(no.var=4, Tau1.labels=c("a", "b", "c", "d"))
T1

## End(Not run)

metaSEM documentation built on May 18, 2021, 1:06 a.m.