TABLE OF CONTENTS


CWrappers/cmklik.spline.frail [ Functions ]

NAME

    cmklik.spline.frail --- wrapper for cInitLikFrailSpline

FUNCTION

Wraps cInitLikFrailSpline, which computes the frailty spline parameter likelihood during initialization.

SYNOPSIS

3411 cmklik.spline.frail <- function(par, fixedind, frailParY, weight, B, E, M, P,
3412             penaltyType, sigma2, min)

INPUTS

    par        vector of spline parameters whose likelihood should be computed
    fixedind   index of the parameter held fixed for identifiability
    frailParY  parametric frailty density evaluated at each of the frailties
    weight     relative weight of parametric and spline component
    B          spline basis produced by csplinedesign
    E          vector of 1-means produced by cevalEinte
    M          large number used to penalize the frailty mean
    P          penalty matrix
    penaltyType    integer, see typePenalty
    sigma2     prior variance of spline parameters
    min        minimum allowed value of spline parameters

OUTPUTS

SOURCE

3415 {
3416     par <- as.double(repairfrailtypar(par, fixedind))
3417     lik <- as.double(0);
3418     out <- .C("cInitLikFrailSpline", lik = lik, par = par, frailParY = frailParY,
3419         weight = weight, B = B, E = E, M = M, P = P, penaltyType = penaltyType, sigma2 = sigma2,
3420         ny = as.integer(length(frailParY)), nj = as.integer(length(par)), DUP = FALSE)
3421     lik <- out$lik
3422     lik <- lik - sum(ifelse(par< min, (par - min)^2, 0))    
3423     return(lik)
3424 }