The BGLIMM Procedure

REPEATED Statement

  • REPEATED repeated-effect </ options>;

The REPEATED statement specifies the bold upper R matrix in the model. Its syntax is similar to that of the REPEATED statement in PROC MIXED. If you omit this statement, bold upper R is assumed to be equal to sigma squared bold upper I. The REPEATED statement is available only for the normal distribution with the identity link in this release.

Specifying a repeated-effect is required in order to inform PROC BGLIMM of the proper location of the observed repeated responses. The repeated-effect must contain only classification variables. You specify the SUBJECT= option to identify repeated measures for the same subject and set up the blocks of bold upper R. You can use the TYPE= option to define the covariance structure. The levels of the repeated-effect must be different for each observation within a subject; otherwise, PROC BGLIMM produces an error message.

Table 12 summarizes the options available in the REPEATED statement. All options are then discussed in alphabetical order.

Table 12: Summary of REPEATED Statement Options

Option Description
Construction of Covariance Structure
COVPRIOR= Specifies the prior for the bold upper R matrix
GROUP= Defines an effect that specifies heterogeneity in the bold upper R covariance structure
NUTS Specifies options for the No-U-Turn Sampler of the Hamiltonian
Monte Carlo algorithm for the bold upper R matrix
SUBJECT= Identifies the subjects in the R-side model
TYPE= Specifies the type of the bold upper R matrix
Statistical Output
NOPRINTCOV Suppresses displaying the results for the covariance matrix parameters
R Displays the estimated bold upper R matrix
RCORR Display the correlation matrix that corresponds to the estimated bold upper R matrix


You can specify the following options in the REPEATED statement after a slash (/):

COVPRIOR=prior-distribution

specifies a prior distribution for the bold upper R matrix of the residuals, when the bold upper R matrix is of the UN, UN(1), VC, or TOEP(1) type, where a conjugate sampler is used. This option is ignored for other covariance types, because you assign a flat prior to the bold upper R matrix if its type is not UN, UN(1), VC, or TOEP(1).

You can specify one of the following prior-distributions:

HALFCAUCHY <(SCALE=a)>
HCAUCHY <(SCALE=a)>
HC <(SCALE=a)>

specifies the prior to be a half-Cauchy distribution. The half-Cauchy prior is applied only to the diagonal terms (variances) of the bold upper R matrix. The off-diagonal terms of the bold upper R matrix are assumed to have a flat prior.

You can specify the scale parameter a of the half-Cauchy distribution. The scale parameter a must be positive. By default, SCALE=25.

HALFNORMAL <(VAR=a)>
HNORMAL <(VAR=a)>
HN <(VAR=a)>

specifies the prior to be a half-normal distribution. The half-normal prior is applied only to the diagonal terms (variances) of the bold upper R matrix. The off-diagonal terms of the bold upper R matrix are assumed to have a flat prior.

You can specify the variance a of the half-normal distribution. The variance a must be positive. By default, VAR=25.

IGAMMA <(options)>

specifies an inverse gamma prior, normal upper I normal upper G left-parenthesis a comma b right-parenthesis, with the density f left-parenthesis t right-parenthesis equals StartFraction b Superscript a Baseline Over normal upper Gamma left-parenthesis a right-parenthesis EndFraction t Superscript minus left-parenthesis a plus 1 right-parenthesis Baseline normal e Superscript negative b slash t for each diagonal term of the bold upper R matrix. It is the default prior for the covariance types UN(1), VC, and TOEP(1).

You can set the parameters for the inverse gamma distribution by specifying one or both of the following options, separated by a comma or a space:

SHAPE=a

specifies the shape parameter a of the inverse gamma distribution. By default, SHAPE=2.

SCALE=b

specifies the scale parameter b of the inverse gamma distribution. By default, SCALE=2.

IWISHART <(options)>
IWISH <(options)>
IW <(options)>

specifies an inverse Wishart prior, normal upper I normal upper W normal upper I normal upper S normal upper H normal upper A normal upper R normal upper T left-parenthesis a comma b right-parenthesis, for the bold upper R matrix. It is the default prior for the UN covariance type.

You can set the parameters of the inverse Wishart distribution by specifying one or both of the following options, separated by a comma or a space:

DF=a

specifies the degrees of freedom a of the inverse Wishart distribution. The default is the dimension of the bold upper R matrix plus 3.

SCALE=b

specifies b bold upper I as the scale matrix of the inverse Wishart distribution, where bold upper I is the identity matrix. The default is the dimension of the bold upper R matrix plus 3.

SIWISHART <(options)>
SIWISH <(options)>
SIW <(options)>

specifies a scaled inverse Wishart prior for the bold upper R matrix.

You can set the parameters of the scaled inverse Wishart distribution by specifying one or more of the following options, separated by a comma or a space:

DF=a

specifies the degrees of freedom a of the scaled inverse Wishart distribution. The default is the dimension of the bold upper R matrix plus 3.

SCALE=b

specifies b bold upper I as the scale matrix of the scaled inverse Wishart distribution, where bold upper I is the identity matrix. The default is the dimension of the bold upper R matrix plus 3.

VAR=c

specifies the variance parameter c of the normal prior for log left-parenthesis delta Subscript i Baseline right-parenthesis. By default, VAR=1.

UNIFORM <(options)>
UNIF <(options)>

specifies a uniform prior, normal upper U normal upper N normal upper I normal upper F normal upper O normal upper R normal upper M left-parenthesis a comma b right-parenthesis, for the bold upper R matrix. The uniform prior is applied to standard deviations (the square root of the diagonal terms) of the bold upper R matrix.

You can set the lower and upper bounds of the uniform distribution by specifying one or both of the following options, separated by a comma or a space:

LOWER=a

specifies the lower bound a of the uniform distribution. The lower bound must be nonnegative. By default, LOWER=0.

UPPER=b

specifies the upper bound b of the uniform distribution. The upper bound must be positive. By default, UPPER=1E10.

GROUP=effect
GRP=effect

defines an effect that specifies heterogeneity in the covariance structure of bold upper R. All observations that have the same level of the effect have the same covariance parameters. Each new level of the effect produces a new set of covariance parameters that has the same structure as the original group. You should exercise caution in properly defining the effect, because strange covariance patterns can result when it is misused. The effect can greatly increase the number of estimated covariance parameters.

The GROUP= effect must be specified as a variable in the CLASS statement.

NOPRINTCOV

suppresses displaying results (summary statistics, diagnostics, and plots) for the parameters for the covariance matrix. In models that have many repeated measurements, the number of parameters involved in the covariance matrix can be very large and then it can take a long time to display the summary, diagnostic statistics, and plots for all these parameters. By default, this option is off.

NUTS(nuts-options)

specifies options for the No-U-Turn Sampler (NUTS) of the Hamiltonian algorithm that is used to sample the parameters in the bold upper R matrix of the residuals. The NUTS algorithm is a version of the adaptive Hamiltonian Monte Carlo algorithm with automatic tuning of the step size and number of steps in each iteration. For more information, see the section Hamiltonian Monte Carlo Sampler. You can specify the following nuts-options:

DELTA=value

specifies the target acceptance rate during the tuning process of the NUTS algorithm. Increasing the value can often improve mixing, but it can also significantly slow down the sampling. By default, DELTA=0.6.

MAXHEIGHT=value

specifies the maximum height of the NUTS algorithm tree. The taller the tree, the more gradient evaluations per iteration the procedure calculates. The number of evaluations is 2 Superscript height. Usually, the height of a tree should be no more than 10 during the sampling stage, but it can go higher during the tuning stage. A larger number indicates that the algorithm is having difficulty converging. By default, MAXHEIGHT=10.

NTU=value

specifies the number of tuning iterations that the NUTS algorithm uses. By default, NTU=1000.

STEPSIZE=value

specifies the initial step size in the NUTS algorithm. By default, STEPSIZE=0.1.

These options are similar to those in the RANDOM statement.

R

displays the estimated bold upper R matrix. The ODS table name is R.

RCORR

produces the correlation matrix that corresponds to the estimated bold upper R matrix. The ODS table name is RCorr.

SUBJECT=effect
SUB=effect

identifies the subjects for the blocking structure in bold upper R. The repeated measures for the same subject must be together in the data. Complete independence is assumed across subjects; therefore, this option produces a block diagonal structure in bold upper R that has identical blocks. The effect must be specified as a categorical variable in the CLASS statement.

TYPE=covariance-structure

specifies the covariance structure of the bold upper R matrix. The SUBJECT= option defines the blocks of bold upper R, and the TYPE= option specifies the structure of these blocks. Valid values for covariance-structure and their descriptions are provided in Table 10, and some examples are shown in Table 11. By default, TYPE=VC.

Last updated: December 09, 2022