R/compute.approx.lr.R

Defines functions compute.approx.lr

#### computes the approximate likelihood for given theta, my, sigma
#### data in via y, P and M
compute.approx.lr <-
function(theta, mu, sigma, y, Py, M){
  ### precompute some things
  n = length(y)
  
  -M*theta - 0.5*M*theta^2 - 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.