R/compute.exact.lr.R

Defines functions compute.exact.lr

#### computes the exact likelihood for given theta, my, sigma
#### data in via y, P and M
compute.exact.lr <-
function(theta, mu, sigma, y, Py, M){
  ### precompute some things
  n = length(y)
  
  M*log(1-theta) - n*log(sigma) - 0.5*sum((y -theta*Py - mu)^2)/sigma^2
}

Try the prototest package in your browser

Any scripts or data that you put into this service are public.

prototest documentation built on May 2, 2019, 4:02 p.m.