Thanks a lot Rick, this was really helpful, I found my mistakes.
In your program:
1. You don't need NearestCorr (Higham's algorithm) because the AR1Corr function returns a positive definite kinship matrix.
Here it is not needed, but I might need it when I am using the true similarity matrix
2. I think your main problem is that you are assigning snp1 = snp2 = ... = snp5 = GT[,1]. If these are supposed to be covariates in the mixed model, they can't be equal or you have a singular design matrix. I think the ERROR is coming from this mistake. Also, shouldn't they be CLASS variables in PROC MIXED?
I overlooked this, it should be snp2=GT[,2], snp3=GT[,3],...Now, I get the expected results
I assume a dosage effect of the alleles, snp is either 0 (no allele effect, snp=1 effect of 1 allele, snp=2, effect of 2 alleles), hence they are not class variables.
3. You are currently generating one random variate from MVN(0, varcov. I assume this should be 100 variates:eps = RandNormal(100, zero, varCov).
I think eps = RandNormal(1, zero, R) is ok. Trait has dimension 100x1, X(100x6), beta(6x1), and thus eps(100x1). This is similar to the example 12.3.2.2. in your book on simulation.
... View more