Hi, there is a procedure to calculate the determinant and I want to use it within the nlmixed procedure. To give an example I modified an nlmixed example from the doc. This doesn't make much sense but illustrates my point. The following works: proc nlmixed data=theoph;
parms beta1=-3.22 beta2=0.47 beta3=-2.45
s2b1 =0.03 cb12 =0 s2b2 =0.4 s2=0.5;
cl = exp(beta1 + b1);
ka = exp(beta2 + b2);
ke = exp(beta3);
pred = cl*beta1 - ka*ke;
model conc ~ normal(pred,s2);
random b1 b2 ~ normal([0,0],[s2b1,cb12,s2b2]) subject=subject;
run; But when I substitute "cl*beta1 - ka*ke" by a seemingly equivalent call to det I get an error. proc nlmixed data=theoph;
parms beta1=-3.22 beta2=0.47 beta3=-2.45
s2b1 =0.03 cb12 =0 s2b2 =0.4 s2=0.5;
cl = exp(beta1 + b1);
ka = exp(beta2 + b2);
ke = exp(beta3);
array A [2,2];
A[1,1] = cl;
A[1,2] = ka;
A[2,1] = ke;
A[2,2] = beta1;
call det(A, pred);
model conc ~ normal(pred,s2);
random b1 b2 ~ normal([0,0],[s2b1,cb12,s2b2]) subject=subject;
run; The error is: NOTE: Array argument A is ignored for the derivative of the 'DET' function.
ERROR: Random effect b1 not found in the model. Is there a way to overcome this? Of course in my real code I want to calculate a larger determinant and also use other matrix operations. Thanks
... View more