Hi !
I want to run the next procedure,
data TMT;
input trat rep c1 c2 c3 c4 c5 c6 c7 c8 c9;
y=c1; conteo=1; output;
y=c2; conteo=2; output;
y=c3; conteo=3; output;
y=c4; conteo=4; output;
y=c5; conteo=5; output;
y=c6; conteo=6; output;
y=c7; conteo=7; output;
y=c8; conteo=8; output;
y=c9; conteo=9; output;
drop c1-c9;
datalines;
1 1 57.9 71.4 87.5 74.3 95.6 92.0 94.1 85.7 94.5
1 2 42.9 69.2 90.5 80.0 98.0 96.7 95.9 94.9 93.6
1 3 37.5 71.4 88.9 54.5 100.0 93.8 88.9 100.0 87.5
1 4 30.8 92.3 85.2 82.8 92.5 94.9 88.4 95.5 92.7
2 1 76.0 47.1 80.6 64.7 97.4 85.4 89.5 86.8 91.4
2 2 55.6 31.6 82.4 78.9 96.4 96.8 76.5 90.0 85.7
2 3 33.3 100.0 100.0 80.0 100.0 100.0 94.4 90.5 88.1
2 4 100.0 100.0 100.0 100.0 94.4 100.0 100.0 100.0 75.0
3 1 66.7 3.3 66.7 100.0 94.4 95.2 83.3 94.1 80.6
3 2 75.0 18.2 100.0 93.5 83.0 94.6 82.8 91.2 88.5
3 3 66.7 54.5 84.6 94.4 73.9 95.0 90.5 90.9 95.2
3 4 44.4 25.0 50.0 100.0 100.0 100.0 90.0 100.0 71.4
4 1 57.9 65.0 73.9 52.4 87.0 100.0 74.2 91.7 81.0
4 2 42.9 50.0 50.0 83.3 100.0 100.0 87.5 100.0 100.0
4 3 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0
4 4 50.0 70.4 94.1 56.4 100.0 95.1 84.4 79.1 92.5
;
proc mixed data=TMT;
class trat conteo;
model y = trat conteo trat*conteo;
repeated conteo / type= un sub= rep r rcorr;
random rep;
lsmeans trat conteo trat*CONTEO/ pdiff adjust=tukey ;
run;
and in the log appears this legend: WARNING: Unable to make hessian positive definite.
What I do wrong?
You cannot use
random rep;
in combination with type=un because UN is defined with G matrix =0. See https://faculty.washington.edu/heagerty/Courses/VA-longitudinal/private/Littell-StatMed2000.pdf. If you omit this statement, your model will converge.
Some additional observations:
(1) You probably can find a covariance type that is more parsimonious than UN.
(2) You should use the DDFM option on the MODEL statement; KR2 is usually a good choice.
(3) Your response variable is a percentage and as such assumptions of normality and homogeneity of variance are not well met. Consider either a transformation http://support.sas.com/documentation/cdl/en/stsug/62259/HTML/default/viewer.htm#ugvartransform_sect6...
or the beta distribution in the GLIMMIX procedure.
I hope this helps.
You cannot use
random rep;
in combination with type=un because UN is defined with G matrix =0. See https://faculty.washington.edu/heagerty/Courses/VA-longitudinal/private/Littell-StatMed2000.pdf. If you omit this statement, your model will converge.
Some additional observations:
(1) You probably can find a covariance type that is more parsimonious than UN.
(2) You should use the DDFM option on the MODEL statement; KR2 is usually a good choice.
(3) Your response variable is a percentage and as such assumptions of normality and homogeneity of variance are not well met. Consider either a transformation http://support.sas.com/documentation/cdl/en/stsug/62259/HTML/default/viewer.htm#ugvartransform_sect6...
or the beta distribution in the GLIMMIX procedure.
I hope this helps.
Excuse me!
Do you have the procedure to check the assumptions?
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.