And by the way.... [R for BE/BA]

posted by ElMaestro  – Denmark, 2020-07-24 12:52 (179 d 13:48 ago) – Posting: # 21785
Views: 8,235

##returns the restricted log likelihood.
##apart from k, this is line 3 of page 10 of:
##k is defined from the number of observations, and .
  k=  -((length(y)-ncol(X))/2)*log(2*pi)
  A= -0.5*log( det(CovM))
  B= -0.5*log( det(t(X) %*% solve(CovM) %*% X))
  est.b = solve(t(X) %*% solve(CovM) %*% X) %*% t(X) %*% solve(CovM) %*% y
  tmp= y - X %*% est.b
  C=-0.5 *(t(tmp) %*% solve(CovM) %*% tmp)

....this is exactly also the REML likelihood function that SAS defines.

Pass or fail!

Complete thread:

 Admin contact
21,306 posts in 4,443 threads, 1,488 registered users;
online 10 (0 registered, 10 guests [including 3 identified bots]).
Forum time: Wednesday 01:40 CET (Europe/Vienna)

Power: That which is wielded by the priesthood of
clinical trials, the statisticians, and a stick which they use
to beta their colleagues.    Stephen Senn

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz