> Whick PROC step can I use to directly verify the
> variance of a sample is equal or not equal to a
> specify value?(I just don't want to build the
> statistics by myself).Thanks for your answer.
I think you have to create the test statistic yourself, using the computed variance, the hypothesized value, and the F-distribution.
In addition to the COVTEST statement of the GLIMMIX procedure (which does not seem to function when the only variance parameter is a residual variance), the UNIVARIATE procedure will construct 1-tailed and 2-tailed confidence limits for the variance of a response which is assumed to be normally distributed. That does not directly test a null hypothesis about the variance being a specified value. However, if you construct an alpha=0.05 CI and the CI includes the value under the null hypothesis, then you would not reject the null hypothesis at alpha=0.05.
If your null hypothesis has a two-tailed alternative (and you can assume that the response is normally distributed), then you can download from SAS a macro which will compute the p-value for the specified null. See http://support.sas.com/kb/25/024.html. The macro will not test a null hypothesis with a 1-sided alternative.
Thanks for posting the example. I had tried using the NOPROFILE option previously without success. What I did not have is the RANDOM statement specifying the residual with a unique subject specification. It is nice to know that it is possible to obtain a test of the residual variance using the COVTEST statement. However, it is not the most convenient syntax.
One can use different methods to get confidence intervals for a variance in GLIMMIX. I prefer the Profile-Likelihood method (type=profile), but the elr method is fine also. A simpler approach is to use Wald-type confidence intervals, as shown below. This is the approach used by PROC TTEST to give the confidence interval for the standard deviation. That is, if you take the square-root of the point estimate of the variance and square-root of the limits of the confidence interval from PROC GLIMMIX (with the Wald method), one gets the standard deviation estimate (and the confidence limits) in TTEST. Of course, the TTEST approach only works for a single variance in a model, but GLIMMIX allows for any number of variance-covariance estimates.
do id=1 to 30;
proc glimmix data=sample noprofile;
model y= ;
random _residual_ / subject=id;
*covtest / cl(type=elr);
*covtest / cl(type=profile);
covtest / cl(type=Wald);