Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The MIXED Procedure

REPEATED Statement

REPEATED < repeated-effect > < / options > ;
The REPEATED statement is used to specify the R matrix in the mixed model. Its syntax is different from that of the REPEATED statement in PROC GLM. If no REPEATED statement is specified, R is assumed to be equal to \sigma^2 I.

For many repeated measures models, no repeated effect is required in the REPEATED statement. Simply use the SUBJECT= option to define the blocks of R and the TYPE= option to define their covariance structure. In this case, the repeated measures data must be similarly ordered for each subject, and you must indicate all missing response variables with periods in the input data set unless they all fall at the end of a subject's repeated response profile. These requirements are necessary in order to inform PROC MIXED of the proper location of the observed repeated responses.

Specifying a repeated effect is useful when you do not want to indicate missing values with periods in the input data set. The repeated effect must contain only classification variables. Make sure that the levels of the repeated effect are different for each observation within a subject; otherwise, PROC MIXED constructs identical rows in R corresponding to the observations with the same level. This results in a singular R and an infinite likelihood. Whether you specify a REPEATED effect or not, the rows of R for each subject are constructed in the order that they appear in the input data set.

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

GROUP=effect
GRP=effect
defines an effect specifying heterogeneity in the covariance structure of R. All observations having the same level of the GROUP effect have the same covariance parameters. Each new level of the GROUP effect produces a new set of covariance parameters with the same structure as the original group. You should exercise caution in properly defining the GROUP effect, as strange covariance patterns can result with its misuse. Also, the GROUP effect can greatly increase the number of estimated covariance parameters, which may adversely affect the optimization process.

Continuous variables are permitted as arguments to the GROUP= option. PROC MIXED does not sort by the values of the continuous variable; rather, it considers the data to be from a new subject or group whenever the value of the continuous variable changes from the previous observation. Using a continuous variable decreases execution time for models with a large number of subjects or groups and also prevents the production of a large "Class Levels Information" table.

HLM
produces a table of Hotelling-Lawley-McKeon statistics (McKeon 1974) for all fixed effects whose levels change across data having the same level of the SUBJECT= effect (the within-subject fixed effects). This option applies only when you specify a REPEATED statement with the TYPE=UN option and no RANDOM statements. For balanced data, this model is equivalent to the multivariate model for repeated measures in PROC GLM.

The Hotelling-Lawley-McKeon statistic has a slightly better F approximation than the Hotelling-Lawley-Pillai-Samson statistic (see the description of the HLPS option, which follows). Both of the Hotelling-Lawley statistics can perform much better in small samples than the default F statistic (Wright 1994).

Separate tables are produced for Type I, II, and III tests, according to the ones you select. For ODS purposes, the labels for these tables are "HLM1," "HLM2," and "HLM3," respectively.

HLPS
produces a table of Hotelling-Lawley-Pillai-Samson statistics (Pillai and Samson 1959) for all fixed effects whose levels change across data having the same level of the SUBJECT= effect (the within-subject fixed effects). This option applies only when you specify a REPEATED statement with the TYPE=UN option and no RANDOM statements. For balanced data, this model is equivalent to the multivariate model for repeated measures in PROC GLM, and this statistic is the same as the Hotelling-Lawley Trace statistic produced by PROC GLM.

Separate tables are produced for Type I, II, and III tests, according to the ones you select. For ODS purposes, the labels for these tables are "HLPS1," "HLPS2," and "HLPS3," respectively.

LDATA=SAS-data-set
reads the coefficient matrices associated with the TYPE=LIN(number) option. The data set must contain the variables PARM, ROW, COL1 -COLn, or PARM, ROW, COL, VALUE. The PARM variable denotes which of the number coefficient matrices is currently being constructed, and the ROW, COL1 - COLn, or ROW, COL, VALUE variables specify the matrix values, as they do with the RANDOM statement option GDATA=. Unspecified values of these matrices are set equal to 0.

LOCAL
LOCAL=EXP(<effects>)
LOCAL=POM(POM-data-set)
requests that a diagonal matrix be added to R. With just the LOCAL option, this diagonal matrix equals \sigma^2 I, and \sigma^2 becomes an additional variance parameter that PROC MIXED profiles out of the likelihood provided that you do not specify the NOPROFILE option in the PROC MIXED statement. The LOCAL option is useful

if you want to add an observational error to a time series structure (Jones and Boadi-Boateng 1991) or a nugget effect to a spatial structure (Cressie 1991).

The LOCAL=EXP(<effects>) option produces exponential local effects, also known as dispersion effects, in a log-linear variance model. These local effects have the form
\sigma^2{\rm diag}[{\rm exp}({U \delta})]
where U is the full-rank design matrix corresponding to the effects that you specify and  {\delta} are the parameters that PROC MIXED estimates. An intercept is not included in U because it is accounted for by \sigma^2. PROC MIXED constructs the full-rank U in terms of 1s and -1s for classification effects. Be sure to scale continuous effects in U sensibly.

The LOCAL=POM(POM-data-set) option specifies the power-of-the-mean structure. This structure possesses a variance of the form \sigma^2 |{x}'_i{\beta}^*|^\theta for the ith observation, where xi is the ith row of X (the design matrix of the fixed effects), and {\beta}^* is an estimate of the fixed-effects parameters that you specify in POM-data-set.

The SAS data set specified by POM-data-set contains the numeric variable Estimate (in previous releases, the variable name was required to be EST), and it has at least as many observations as there are fixed-effects parameters. The first p observations of the Estimate variable in POM-data-set are taken to be the elements of {\beta}^*, where p is the number of columns of X. You must order these observations according to the nonfull-rank parameterization of the MIXED procedure. One easy way to set up POM-data-set for a {\beta}^* corresponding to ordinary least squares is illustrated by the following code:

   ods output SolutionF=sf;
   proc mixed;
      class a;
      model y = a x / s;
   run;

   proc mixed;
      class a;
      model y = a x;
      repeated / local=pom(sf);
   run;


Note that the generalized least-squares estimate of the fixed-effects parameters from the second PROC MIXED step usually is not the same as your specified {\beta}^*. However, you can iterate the POM fitting until the two estimates agree. Continuing from the previous example, the code for performing one step of this iteration is as follows.

   ods output SolutionF=sf1;
   proc mixed;
      class a;
      model y = a x / s;
      repeated / local=pom(sf);
   run;

   proc compare brief data=sf compare=sf1;
      var estimate;
   run;

   data sf;
      set sf1;
   run;


Unfortunately, this iterative process does not always converge. For further details, refer to the description of pseudo-likelihood in Chapter 3 of Carroll and Ruppert (1988).

LOCALW
specifies that only the local effects and no others be weighted. By default, all effects are weighted. The LOCALW option is used in connection with the WEIGHT statement and the LOCAL option in the REPEATED statement

NONLOCALW
specifies that only the nonlocal effects and no others be weighted. By default, all effects are weighted. The NONLOCALW option is used in connection with the WEIGHT statement and the LOCAL option in the REPEATED statement

R<=value-list>
requests that blocks of the estimated R matrix be displayed. The first block determined by the SUBJECT= effect is the default displayed block. PROC MIXED displays blanks for value-lists that are 0.

The value-list indicates the subjects for which blocks of R are to be displayed. For example,

   repeated / type=cs subject=person r=1,3,5;


displays block matrices for the first, third, and fifth persons. See the "PARMS Statement" section for the possible forms of value-list. The table name for ODS purposes is "R".

RC<=value-list>
produces the Cholesky root of blocks of the estimated R matrix. The value-list specification is the same as with the R option. The table name for ODS purposes is "CholR".

RCI<=value-list>
produces the inverse Cholesky root of blocks of the estimated R matrix. The value-list specification is the same as with the R option. The table name for ODS purposes is "InvCholR".

RCORR<=value-list>
produces the correlation matrix corresponding to blocks of the estimated R matrix. The value-list specification is the same as with the R option. The table name for ODS purposes is "RCorr".

RI<=value-list>
produces the inverse of blocks of the estimated R matrix. The value-list specification is the same as with the R option. The table name for ODS purposes is "InvR".

SSCP
requests that an unstructured R matrix be estimated from the sum-of-squares-and-crossproducts matrix of the residuals. It applies only when you specify TYPE=UN and have no RANDOM statements. Also, you must have a sufficient number of subjects for the estimate to be positive definite.

This option is useful when the size of the blocks of R are large (for example, greater than 10) and you want to use or inspect an unstructured estimate that is much quicker to compute than the default REML estimate. The two estimates will agree for certain balanced data sets when you have a classification fixed effect defined across all time points within a subject.

SUBJECT=effect
SUB=effect
identifies the subjects in your mixed model. Complete independence is assumed across subjects; therefore, the SUBJECT= option produces a block-diagonal structure in R with identical blocks. When the SUBJECT= effect consists entirely of classification variables, the blocks of R correspond to observations sharing the same level of that effect. These blocks are sorted according to this effect as well.

Continuous variables are permitted as arguments to the SUBJECT= option. PROC MIXED does not sort by the values of the continuous variable; rather, it considers the data to be from a new subject or group whenever the value of the continuous variable changes from the previous observation. Using a continuous variable decreases execution time for models with a large number of subjects or groups and also prevents the production of a large "Class Levels Information" table.

If you want to model nonzero covariance among all of the observations in your SAS data set, specify SUBJECT=INTERCEPT to treat the data as if they are all from one subject. Be aware though that, in this case, PROC MIXED manipulates an R matrix with dimensions equal to the number of observations. If no SUBJECT= effect is specified, then every observation is assumed to be from a different subject and R is assumed to be diagonal. For this reason, you usually want to use the SUBJECT= option in the REPEATED statement.

TYPE=covariance-structure
specifies the covariance structure of the R matrix. The SUBJECT= option defines the blocks of R, and the TYPE= option specifies the structure of these blocks. Valid values for covariance-structure and their descriptions are provided in Table 41.3 and Table 41.4. The default structure is VC.



Table 41.3: Covariance Structures
Structure Description Parms (i,j)th element
ANTE(1)Ante-Dependence2t-1\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_k
AR(1)Autoregressive(1)2\sigma^2\rho^{| i-j|}
ARH(1)Heterogeneous AR(1)t+1\sigma_{i}\sigma_{j}\rho^{| i-j|}
ARMA(1,1)ARMA(1,1)3\sigma^2[\gamma\rho^{| i-j|-1}{{1(i\neq\space j)}}+{{1(i=j)}}]
CSCompound Symmetry2\sigma^2_1 + \sigma^2 1(i=j)
CSHHeterogeneous CSt+1\sigma_{i}\sigma_{j}[\rho{{1(i\neq\space j)}}+{{1(i=j)}}]
FA(q)Factor Analytic[q/2](2t -q + 1) + t\Sigma_{k=1}^{\min(i,j,q)} \lambda_{ik}\lambda_{jk}+\sigma^2_i 1(i=j)
FA0(q)No Diagonal FA[q/2](2t -q + 1)\Sigma_{k=1}^{\min(i,j,q)} \lambda_{ik}\lambda_{jk}
FA1(q)Equal Diagonal FA[q/2](2t -q + 1) + 1\Sigma_{k=1}^{\min(i,j,q)} \lambda_{ik}\lambda_{jk}+\sigma^2 1(i=j)
HFHuynh-Feldtt+1(\sigma_{i}^2+\sigma_{j}^2)/2+\lambda{{1(i\neq\space j)}}
LIN(q)General Linearq \Sigma_{k=1}^q \theta_k A_{ij}
TOEPToeplitzt\sigma_{| i-j|+1}
TOEP(q)Banded Toeplitzq\sigma_{| i-j|+1} 1(| i-j|\lt q)
TOEPHHeterogeneous TOEP2t-1\sigma_{i}\sigma_{j}\rho_{| i-j|}
TOEPH(q)Banded Hetero TOEPt+q-1\sigma_{i}\sigma_{j}\rho_{| i-j|} 1(| i-j|\lt q)
UNUnstructuredt(t+1)/2\sigma_{ij}
UN(q)Banded[q/2](2t-q+1)\sigma_{ij} 1(| i-j|\lt q)
UNRUnstructured Corrst(t+1)/2\sigma_{i}\sigma_{j}\rho_{\max(i,j)\min(i,j)}
UNR(q)Banded Correlations[q/2](2t-q+1)\sigma_{i}\sigma_{j}\rho_{\max(i,j)\min(i,j)}
UN@AR(1)Direct Product AR(1)t1(t1+1)/2 + 1\sigma_{{i_1}{j_1}}\rho^{|{i_2}-{j_2}|}
UN@CSDirect Product CSt1(t1+1)/2 + 1\sigma_{{i_1}{j_1}}(1-\sigma^2 1(i_2\neq j_2)), 0\le \sigma^2\le 1
UN@UNDirect Product UNt1(t1+1)/2 +\sigma_{1,{i_1}{j_1}}\sigma_{2,{i_2}{j_2}}
  t2(t2+1)/2 - 1 
VCVariance Componentsq\sigma^2_k 1(i=j) and i corresponds to kth effect


In Table 41.3, "Parms" is the number of covariance parameters in the structure, t is the overall dimension of the covariance matrix, and 1(A) equals 1 when A is true and 0 otherwise. For example, 1(i=j) equals 1 when i=j and 0 otherwise, and 1(|i-j|<q) equals 1 when |i-j|<q and 0 otherwise. For the TOEPH structures, \rho_0 = 1, and for the UNR structures, \rho_{ii} = 1 for all i. For the direct product structures, the subscripts "1" and "2" refer to the first and second structure in the direct product, respectively, and i1 = int((i+t2-1)/t2), j1 = int((j+t2-1)/t2), i2 = mod(i-1,t2)+1, and j2 = mod(j-1,t2)+1.



Table 41.4: Spatial Covariance Structures
Structure Description Parms (i,j)th element
SP(EXP)(c-list)Exponential2\sigma^2[\exp(-d_{ij}/\theta)]
SP(EXPA)(c-list)Anisotropic Exponential2c + 1\sigma^2 \prod_{k=1}^c \exp [-\theta_k d(i,j,k)^{p_k}]
SP(GAU)(c-list)Gaussian2\sigma^2[\exp(-d^2_{ij}/\rho^2)]
SP(LIN)(c-list)Linear2\sigma^2(1 - \rho d_{ij})1(\rho d_{ij} \leq 1)
SP(LINL)(c-list)Linear log2\sigma^2(1 - \rho \log(d_{ij}))1(\rho \log(d_{ij}) \leq 1)
SP(POW)(c-list)Power2\sigma^2 \rho^{d_{ij}}
SP(POWA)(c-list)Anisotropic Powerc+1\sigma^2 \rho^{d(i,j,1)}_{1} \rho^{d(i,j,2)}_{2}
  ...  \rho^{d(i,j,c)}_{c}
SP(SPH)(c-list)Spherical2\sigma^2[1 - (\frac{3d_{ij}}{2\rho}) +
 (\frac{d^3_{ij}}{2\rho^3})]1(d_{ij} \leq \rho)


In Table 41.4, c-list contains the names of the numeric variables used as coordinates of the location of the observation in space, and dij is the Euclidean distance between the ith and jth vectors of these coordinates, which correspond to the ith and jth observations in the input data set. For SP(POWA) and SP(EXPA), c is the number of coordinates, and d(i,j,k) is the absolute distance between the kth coordinate, k = 1, ... ,c, of the ith and jth observations in the input data set.

Table 41.5 lists some examples of the structures in Table 41.3 and Table 41.4.



Table 41.5: Covariance Structure Examples
Description Structure Example
Variance ComponentsVC (default)
[ \sigma_{B}^2 & 0 & 0 & 0 \ 0 & \sigma_{B}^2 & 0 & 0 \ 0 & 0 & \sigma_{AB}^2 & 0 \ 0 & 0 & 0 & \sigma_{AB}^2]
Compound SymmetryCS
[ \sigma^2 + \sigma_1 & \sigma_1 & \sigma_1
& \sigma_1 \ \sigma_1 & \sigma^2 + ...
 ...2 + \sigma_1
& \sigma_1 \ \sigma_1 & \sigma_1 & \sigma_1
& \sigma^2 + \sigma_1]
UnstructuredUN
[ \sigma^2_{1} & \sigma_{21} & \sigma_{31} & \sigma_{41} \ \sigma_{21} & \sigma...
 ...a^2_{3} & \sigma_{43} \ \sigma_{41} & \sigma_{42} & \sigma_{43} & \sigma^2_{4}]
Banded Main DiagonalUN(1)
[ \sigma^2_1 & 0 & 0 & 0 \ 0 & \sigma^2_2 & 0 & 0 \ 0 & 0 & \sigma^2_3 & 0 \ 0 & 0 & 0 & \sigma^2_4]
First-Order AutoregressiveAR(1)
\sigma^2[ 1 & \rho & \rho^2 & \rho^3 \ \rho & 1 & \rho & \rho^2 \ \rho^2 & \rho & 1 & \rho \ \rho^3 & \rho^2 & \rho & 1]
ToeplitzTOEP
[ \sigma^2 & \sigma_1 & \sigma_2 & \sigma_3 \ \sigma_1 & \sigma^2 & \sigma_1 & ...
 ...2 & \sigma_1 & \sigma^2 & \sigma_1 \ \sigma_3 & \sigma_2 & \sigma_1 & \sigma^2]
Toeplitz with Two BandsTOEP(2)
[ \sigma^2 & \sigma_1 & 0 & 0 \ \sigma_1 & \sigma^2 & \sigma_1 & 0 \ 0 & \sigma_1 & \sigma^2 & \sigma_1 \ 0 & 0 & \sigma_1 & \sigma^2]
Spatial PowerSP(POW)(c)
\sigma^2[ 1 & \rho^{d_{12}} & \rho^{d_{13}} & \rho^{d_{14}} \ \rho^{d_{21}} & 1...
 ..._{32}} & 1 & \rho^{d_{34}} \ \rho^{d_{41}} & \rho^{d_{42}} & \rho^{d_{43}} & 1]
Heterogeneous AR(1)ARH(1)
[ \sigma_{1}^2 & \sigma_{1}\sigma_{2}\rho &
 \sigma_{1}\sigma_{3}\rho^2 & \sigm...
 ...1}\rho^3 & \sigma_{4}\sigma_{2}\rho &
 \sigma_{4}\sigma_{3}\rho & \sigma_{4}^2]
First-Order Autoregressive Moving-AverageARMA(1,1)
\sigma^2[ 1 & \gamma & \gamma\rho & \gamma\rho^2 \ \gamma & 1 & \gamma & \gamma\rho \ \gamma\rho & \gamma & 1 & \gamma \ \gamma\rho^2 & \gamma\rho & \gamma & 1]
Heterogeneous CSCSH
[ \sigma_{1}^2 & \sigma_{1}\sigma_{2}\rho & \sigma_{1}\sigma_{3}\rho
& \sigma_{...
 ...a_{1}\rho & \sigma_{4}\sigma_{2}\rho & \sigma_{4}\sigma_{3}\rho
& \sigma_{4}^2]
First-Order Factor AnalyticFA(1)
[ \lambda_{1}^2 + d_{1} & \lambda_{1}\lambda_{2} & \lambda_{1}\lambda_{3}
& \la...
 ..._{1} & \lambda_{4}\lambda_{2} & \lambda_{4}\lambda_{3}
& \lambda_{4}^2 + d_{4}]
Huynh-FeldtHF
[ \sigma_{1}^2 & \frac{\sigma_{1}^2+\sigma_{2}^2}2-\lambda
 & \frac{\sigma_{1}^...
 ...ma_{1}^2}2-\lambda
 & \frac{\sigma_{3}^2+\sigma_{2}^2}2-\lambda & \sigma_{3}^2]
First-Order Ante-dependenceANTE(1)
[ \sigma^2_1 &
 \sigma_1 \sigma_2 \rho_1 &
 \sigma_1 \sigma_3 \rho_1 \rho_2 \ \...
 ... \ \sigma_3 \sigma_1 \rho_2 \rho_1 &
 \sigma_3 \sigma_2 \rho_2 &
 \sigma^2_3 \]
Heterogeneous ToeplitzTOEPH [ \sigma^2_1 &
 \sigma_1 \sigma_2 \rho_1 &
 \sigma_1 \sigma_3 \rho_2 &
 \sigma_...
 ...\rho_3 &
 \sigma_4 \sigma_2 \rho_2 &
 \sigma_4 \sigma_3 \rho_1 &
 \sigma^2_4 \]
Unstructured CorrelationsUNR [ \sigma^2_1 &
 \sigma_1 \sigma_2 \rho_{21} &
 \sigma_1 \sigma_3 \rho_{31} &
 \...
 ... &
 \sigma_4 \sigma_2 \rho_{42} &
 \sigma_4 \sigma_3 \rho_{43} &
 \sigma^2_4 \]
Direct Product AR(1)UN@AR(1) [ \sigma^2_{1} & \sigma_{21} \ \sigma_{21} & \sigma^2_{2}
 ]
 \otimes
 [ 1 & \rho & \rho^2 \ \rho & 1 & \rho \ \rho^2 & \rho & 1
 ] =
   [ \sigma^2_{1} & \sigma^2_{1}\rho & \sigma^2_{1} \rho^2 &
 \sigma_{21} & \sigma...
 ...rho & \sigma_{21} &
 \sigma^2_{2} \rho^2 & \sigma^2_{2} \rho & \sigma^2_{2} \ ]


The following provides some further information about these covariance structures:
TYPE=ANTE(1)
specifies the first-order antedependence structure (refer to Kenward 1987, Patel 1991, and Macchiavelli and Arnold 1994). In Table 41.3, \sigma^2_i is the ith variance parameter, and \rho_k is the kth autocorrelation parameter satisfying |\rho_k|
\lt 1.

TYPE=AR(1)
specifies a first-order autoregressive structure. PROC MIXED imposes the constraint |\rho| \lt 1 for stationarity.

TYPE=ARH(1)
specifies a heterogeneous first-order autoregressive structure. As with TYPE=AR(1), PROC MIXED imposes the constraint |\rho| \lt 1 for stationarity.

TYPE=ARMA(1,1)
specifies the first-order autoregressive moving average structure. In Table 41.3, \rho is the autoregressive parameter, \gamma models a moving average component, and \sigma^2 is the residual variance. In the notation of Fuller (1976, p. 68), \rho = \theta_1 and
\gamma = \frac{(1 + b_1\theta_1)(\theta_1 + b_1)}
 {1 + b^2_1 + 2 b_1 \theta_1}
The example in Table 41.5 and |b1| < 1 imply that
b_1 = \frac{\beta - \sqrt{\beta^2 - 4\alpha^2}}{2\alpha}
where \alpha = \gamma - \rho and \beta = 1 + \rho^2 - 2\gamma\rho.PROC MIXED imposes the constraints |\rho| \lt 1 and |\gamma| \lt 1 for stationarity, although for some values of \rho and \gamma in this region the resulting covariance matrix is not positive definite. When the estimated value of \rho becomes negative, the computed covariance is multiplied by \cos (\pi d_{ij}) to account for the negativity.

TYPE=CS
specifies the compound-symmetry structure, which has constant variance and constant covariance.

TYPE=CSH
specifies the heterogeneous compound-symmetry structure. This structure has a different variance parameter for each diagonal element, and it uses the square roots of these parameters in the off-diagonal entries. In Table 41.3, \sigma^2_i is the ith variance parameter, and \rho is the correlation parameter satisfying |\rho| \lt 1.

TYPE=FA(q)
specifies the factor-analytic structure with q factors (Jennrich and Schluchter 1986). This structure is of the form \Lambda\Lambda' + D, where \Lambda is a t ×q rectangular matrix and D is a t ×t diagonal matrix with t different parameters. When q > 1, the elements of \Lambda in its upper right-hand corner (that is, the elements in the ith row and jth column for j > i) are set to zero to fix the rotation of the structure.

TYPE=FA0(q)
is similar to the FA(q) structure except that no diagonal matrix D is included. When q < t, that is, when the number of factors is less than the dimension of the matrix, this structure is nonnegative definite but not of full rank. In this situation, you can use it for approximating an unstructured G matrix in the RANDOM statement or for combining with the LOCAL option in the REPEATED statement. When q = t, you can use this structure to constrain G to be nonnegative definite in the RANDOM statement.

TYPE=FA1(q)
is similar to the FA(q) structure except that all of the elements in D are constrained to be equal. This offers a useful and more parsimonious alternative to the full factor-analytic structure.

TYPE=HF
specifies the Huynh-Feldt covariance structure (Huynh and Feldt 1970). This structure is similar to the CSH structure in that it has the same number of parameters and heterogeneity along the main diagonal. However, it constructs the off-diagonal elements by taking arithmetic rather than geometric means.

You can perform a likelihood ratio test of the Huynh-Feldt conditions by running PROC MIXED twice, once with TYPE=HF and once with TYPE=UN, and then subtracting their respective values of -2 times the maximized likelihood.

If PROC MIXED does not converge under your Huynh-Feldt model, you can specify your own starting values with the PARMS statement. The default MIVQUE(0) starting values can sometimes be poor for this structure. A good choice for starting values is often the parameter estimates corresponding to an initial fit using TYPE=CS.

TYPE=LIN(q)
specifies the general linear covariance structure with q parameters (Helms and Edwards 1991). This structure consists of a linear combination of known matrices that are input with the LDATA= option. This structure is very general, and you need to make sure that the variance matrix is positive definite. By default, PROC MIXED sets the initial values of the parameters to 1. You can use the PARMS statement to specify other initial values.

TYPE=SIMPLE
is an alias for TYPE=VC.

TYPE=SP(EXPA)(c-list)
specifies the spatial anisotropic exponential structure, where c-list is a list of variables indicating the coordinates. This structure has (i,j)th element equal to
\sigma^2 \prod_{k=1}^c \exp [-\theta_k d(i,j,k)^{p_k}]
where c is the number of coordinates and d(i,j,k) is the absolute distance between the kth coordinate (k = 1, ... ,c) of the ith and jth observations in the input data set. There are 2c + 1 parameters to be estimated: \theta_k, pk (k = 1, ... ,c), and \sigma^2.

You may want to constrain some of the EXPA parameters to known values. For example, suppose you have three coordinate variables C1, C2, and C3 and you want to constrain the powers pk to equal 2, as in Sacks et al. (1989). Suppose further that you want to model covariance across the entire input data set and you suspect the \theta_k and \sigma^2 estimates are close to 3, 4, 5, and 1, respectively. Then specify

   repeated / type=sp(expa)(c1 c2 c3) 
      subject=intercept;
   parms (3) (4) (5) (2) (2) (2) (1) / 
      hold=4,5,6;


TYPE=SP(POW)(c-list)
TYPE=SP(POWA)(c-list)
specifies the spatial power structures. When the estimated value of \rho becomes negative, the computed covariance is multiplied by \cos (\pi d_{ij}) to account for the negativity.

TYPE=TOEP<(q)>
specifies a banded Toeplitz structure. This can be viewed as a moving-average structure with order equal to q-1. The TYPE=TOEP option is a full Toeplitz matrix, which can be viewed as an autoregressive structure with order equal to the dimension of the matrix. The specification TYPE=TOEP(1) is the same as \sigma^2 I, where I is an identity matrix, and it can be useful for specifying the same variance component for several effects.

TYPE=TOEPH<(q)>
specifies a heterogeneous banded Toeplitz structure. In Table 41.3, \sigma^2_i is the ith variance parameter and \rho_j is the jth correlation parameter satisfying |\rho_j| \lt
1. If you specify the order parameter q, then PROC MIXED estimates only the first q bands of the matrix, setting all higher bands equal to 0. The option TOEPH(1) is equivalent to both the UN(1) and UNR(1) options.

TYPE=UN<(q)>
specifies a completely general (unstructured) covariance matrix parameterized directly in terms of variances and covariances. The variances are constrained to be nonnegative, and the covariances are unconstrained. This structure is not constrained to be nonnegative definite in order to avoid nonlinear constraints; however, you can use the FA0 structure if you want this constraint to be imposed by a Cholesky factorization. If you specify the order parameter q, then PROC MIXED estimates only the first q bands of the matrix, setting all higher bands equal to 0.

TYPE=UNR<(q)>
specifies a completely general (unstructured) covariance matrix parameterized in terms of variances and correlations. This structure fits the same model as the TYPE=UN(q) option but with a different parameterization. The ith variance parameter is \sigma^2_i. The parameter \rho_{jk} is the correlation between the jth and kth measurements; it satisfies |\rho_{jk}| \lt 1.If you specify the order parameter r, then PROC MIXED estimates only the first q bands of the matrix, setting all higher bands equal to zero.

TYPE=UN@AR(1)
TYPE=UN@CS
TYPE=UN@UN
specify direct (Kronecker) product structures designed for multivariate repeated measures (refer to Galecki 1994). These structures are constructed by taking the Kronecker product of an unstructured matrix (modeling covariance across the multivariate observations) with an additional covariance matrix (modeling covariance across time or another factor). The upper left value in the second matrix is constrained to equal 1 to identify the model. Refer to SAS/IML User's Guide, First Edition, for more details on direct products.

To use these structures in the REPEATED statement, you must specify two distinct REPEATED effects, both of which must be included in the CLASS statement. The first effect indicates the multivariate observations, and the second identifies the levels of time or some additional factor. Note that the input data set must still be constructed in "univariate" format; that is, all dependent observations are still listed observation-wise in one single variable. Although this construction provides for general modeling possibilities, it forces you to construct variables indicating both dimensions of the Kronecker product.

For example, suppose your observed data consist of heights and weights of several children measured over several successive years. Your input data set should then contain variables similar to the following:
  • Y, all of the heights and weights, with a separate observation for each
  • Var, indicating whether the measurement is a height or a weight
  • Year, indicating the year of measurement
  • Child, indicating the child on which the measurement was taken
Your PROC MIXED code for a Kronecker AR(1) structure across years would then be

   proc mixed;
      class Var Year Child;
      model Y = Var Year Var*Year;
      repeated Var Year / type=un@ar(1)
                          subject=Child;
   run;


You should nearly always want to model different means for the multivariate observations, hence the inclusion of Var in the MODEL statement. The preceding mean model consists of cell means for all combinations of VAR and YEAR.

TYPE=VC
specifies standard variance components and is the default structure for both the RANDOM and REPEATED statements. In the RANDOM statement, a distinct variance component is assigned to each effect. In the REPEATED statement, this structure is usually used only with the GROUP= option to specify a heterogeneous variance model.

Jennrich and Schluchter (1986) provide general information about the use of covariance structures, and Wolfinger (1996) presents details about many of the heterogeneous structures. Marx and Thompson (1987), Cressie (1991), and Zimmerman and Harville (1991) discuss spatial structures.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.