TABLE OF CONTENTS


fortranwrappers/fmkproflik2 [ Functions ]

NAME

    fmkproflik2 --- compute profile likelihood

FUNCTION

Compute profile likelihood of regression parameters for a single process, conditional on the frailties and other parameters. This is just a Fortran wrapper for fproflik that avoids unnecessary type conversions for speed. Most of the inputs need to have been converted into the row vectors required by FORTRAN.

SYNOPSIS

1689 fmkproflik2 <- function(m, Ji, betahat, index, delta, times, Z, as, Uijmat, 
1690                         d, ncovs, nr, ns)

INPUTS

    m          number of clusters
    Ji         cluster sizes
    betahat    regression parameters at which the profile likelihood should be
               computed
    index      matrix of indices i,j,k,r,smin,smax for each row (integer)
    delta      vector of event indicators (double)
    times      vector of actual time span for each row (double)
    Z          matrix of covariates (as a double row vector)
    as         matrix of discretization breakpoints (double row vector)
    Uijmat     matrix of frailty estimates (double row vector)
    d          number of rows of Z
    ncovs      number of covariates
    nr         number of strata
    ns         number of breakpoints

OUTPUTS

    loglik     profile loglikelihood of betahat conditional on the other parameters

SOURCE

1693 {
1694     loglik <- as.double(0)
1695     out <- .Fortran("fproflik",
1696         betahat = as.double(betahat), index = index, delta = delta,
1697         times = times, Z = Z, as = as, Uijmat = Uijmat,
1698         d = d, ncovs = ncovs, nr = nr, ns = ns, m = as.integer(m),
1699         maxj = as.integer(max(Ji)), lik = loglik)
1700     return(out$lik)
1701 }