R/pumaPCALikelihoodCheck.R

pumaPCALikelihoodCheck <- function
(
    model
,   expectations
,   varY
,   Y
,   oldL
,   param
,	stepChecks
)
{
    L <- pumaPCALikelihoodBound(model, expectations, varY, Y)
    deltaL <- oldL - L
    oldL <- L
    if( stepChecks )
		cat(
	        sprintf(
	            'Likelihood change with update of %s: %2.4f\n'
	        ,   param
	        ,   deltaL
	        )
	    )
    if (deltaL < 0)
    {
        print(
            paste(
                'Likelihood drop of '
            ,   deltaL
            ,   ' after update of '
            ,   param
            ,   '.'
            )
        )
    }
    list(deltaL, L)
}

Try the puma package in your browser

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

puma documentation built on Nov. 8, 2020, 11:08 p.m.