Syntax


The following statements are available in PROC VARCOMP.

  • PROC VARCOMP < options > ;

    • CLASS variables ;

    • MODEL dependent = < effects > < / options > ;

    • BY variables ;

Only one MODEL statement is allowed. The BY, CLASS, and MODEL statements are described after the PROC VARCOMP statement.

PROC VARCOMP Statement

  • PROC VARCOMP < options > ;

This statement invokes the VARCOMP procedure. You can specify the following options in the PROC VARCOMP statement.

DATA= SAS-data-set

  • specifies the input SAS data set to use. If this option is omitted, the most recently created SAS data set is used.

EPSILON= number

  • specifies the convergence value of the objective function for METHOD=ML or METHOD=REML. By default, EPSILON=1E ˆ’ 8.

MAXITER= number

  • specifies the maximum number of iterations for METHOD=ML or METHOD=REML. By default, MAXITER=50.

METHOD=TYPE1 MIVQUE0 ML REML

  • specifies which of the four methods (TYPE1, MIVQUE0, ML, or REML) you want to use. By default, METHOD= MIVQUE0. For more information see the 'Computational Methods ' section on page 4838.

BY Statement

  • BY variables ;

You can specify a BY statement with PROC VARCOMP to obtain separate analyses on observations in groups defined by the BY variables. When a BY statement appears, the procedure expects the input data set to be sorted in order of the BY variables. The variables are one or more variables in the input data set.

If your input data set is not sorted in ascending order, use one of the following alternatives.

  • Sort the data using the SORT procedure with a similar BY statement.

  • Specify the BY statement option NOTSORTED or DESCENDING in the BY statement for the VARCOMP procedure. The NOTSORTED option does not mean that the data are unsorted but rather that the data are arranged in groups (according to values of the BY variables) and that these groups are not necessarily in alphabetical or increasing numeric order.

  • Create an index on the BY variables using the DATASETS procedure (in base SAS software).

For more information on the BY statement, see the discussion in SAS Language Reference: Concepts . For more information on the DATASETS procedure, see the discussion in the SAS Procedures Guide .

CLASS Statement

  • CLASS variables ;

The CLASS statement specifies the classification variables to be used in the analysis. All effects in the MODEL statement must be composed of effects that appear in the CLASS statement. Class variables can be either numeric or character; if they are character, only the first 16 characters are used.

Numeric class variables are not restricted to integers since a variable's format determines the levels. For more information, see the discussion of the FORMAT statement in SAS Language Reference: Dictionary .

MODEL Statement

  • MODEL dependent = < effects >< / option > ;

The MODEL statement gives the dependent variables and independent effects. If you specify more than one dependent variable, a separate analysis is performed for each one. The independent effects are limited to main effects, interactions, and nested effects; no continuous effects are allowed. All independent effects must be composed of effects that appear in the CLASS statement. Effects are specified in the VARCOMP procedure in the same way as described for the ANOVA procedure. Only one MODEL statement is allowed.

Only one option is available in the MODEL statement.

FIXED= n

  • tells the VARCOMP procedure that the first n effects in the MODEL statement are fixed effects. The remaining effects are assumed to be random. By default, PROC VARCOMP assumes that all effects are random in the model. Keep in mind that if you use bar notation and, for example, specify Y=A B / FIXED=2, then A*B is considered a random effect.




SAS.STAT 9.1 Users Guide (Vol. 7)
SAS/STAT 9.1 Users Guide, Volumes 1-7
ISBN: 1590472438
EAN: 2147483647
Year: 2004
Pages: 132

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net