Programming the statistical procedures from SAS

Variance Analysis

Regular Contributor
Posts: 180

Variance Analysis

[ Edited ]


Hello all,


I am editing my question since I had progress with it.


I have lab results, the measurement is Y, and I have some factors X1, X2, X3,...


In addition, for each combination, a duplicate of measurements.


I am interested in the variance components, meaning, I want the % of variation that can be addressed to each factor.


My code is:



My code is:

proc varcomp method=reml data=RR;
class X1 X2 X3 X4;
model Y=X1 X2 X3 X4 / fixed=0;

proc mixed data = RR;
class X1 X2 X3 X4;
model Y = ;
random X1 X2 X3 X4;





I tried running this in JMP (just to validate, I must use SAS on this one), and JMP said that the REML estimators are negative and therefore it used Bayesian estimators instead. By doing so, the estimate of the total variability was not far from the observed variaility across all samples. When I forced JMP to stick with REML, it was identical to SAS, but I think wrong. In addition, I only got the right variability when I asked for nested factors.


My questions are:

1. How do I ask SAS for Bayesian estimators ?

2. How do I specify nested factors ?

3. If in addition to the variability between each factor (between lots, between days,...) I want also the CV, how do I obtain the mean for diviging the SD with ?


thank you



Ask a Question
Discussion stats
  • 0 replies
  • 1 in conversation