R/loglh2.R

Defines functions loglh2

loglh2 <- function(t, x, alpha, beta, sigmaSq)
{
    n <- length(t)
    lh <- 0
    xbeta <- as.vector( as.matrix(x) %*% beta)
    
    for(i in 1:n)
    {
        lh <- lh + dnorm(log(t[i]), alpha + xbeta[i], sqrt(sigmaSq), log = TRUE)
    }
    return(lh)
}

Try the psbcGroup package in your browser

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

psbcGroup documentation built on June 24, 2021, 9:08 a.m.