Hello , i have a question about the estimating sampling distribution of the variance of random effects of the data(varCS and varR) that i was simulating using repeated measures data having fixed effect and random error effects.i used proc univariate to see the sampling distributions but why my estimations are not close to the variance of CS and residuals ? R is a compound symmetry matrix. bellow is my code proc iml; FixedVar = "_X1":"_X48"; use All; read all var FixedVar into X; close All; use SolutionF; read all var {Estimate} into beta; close; eta = X*beta; use CovParms; read all var {Estimate} into var; close; varCS=var[1]; varR=var[2]; /* Variance of residuals*/ k=15; s=17; b=varCS*j(k,k,1 )+varR*I(k); R=b; do i=2 to s; R=block(R,b); end; R = I(s) @ b;*print R; zer = j(1,k*s,0);*print zer; call randseed(1234); eps= j(nrow(x) , 500); call randgen(eps, "normal" ,zer ,R); Y = eta +eps; * print Y; yNames = "y1": ("y"+strip(char(500))); create Simdat from Y[c=yNames]; append from Y; close; quit;
... View more