TABLE OF CONTENTS
ZZdebug/fmkproflik [ Functions ]
NAME
fmkproflik --- compute profile likelihood
FUNCTION
Compute profile likelihood of regression parameters for a single process, conditional on the frailties and other parameters. This is superseded by the faster wrapper fmkproflik2, but is still in the code for debugging.
SYNOPSIS
1630 fmkproflik <- function(m, Ji, betahat, datamat, as, Uijmat)
INPUTS
m number of clusters Ji cluster sizes betahat regression coefficient estimates datamat data matrix generated by makedatamat as matrix of discretization breakpoints Uijmat matrix of frailty estimates
OUTPUTS
loglik profile loglikelihood of betahat conditional on the other parameters
SOURCE
1633 { 1634 loglik <- 0 1635 covs <- matrix(datamat[, -(1:8)], dim(datamat)[1], dim(datamat)[2] - 8) 1636 ncovs <- dim(covs)[2] 1637 d <- dim(covs)[1] 1638 index <- datamat[, c("i", "j", "k", "r", "smin", "smax")] 1639 delta <- datamat[, "delta"] 1640 times <- datamat[, "time"] 1641 1642 out <- .Fortran("fproflik", 1643 betahat = as.double(betahat), 1644 index = as.integer(index), 1645 delta = as.double(delta), 1646 time = as.double(times), 1647 Z = as.double(covs), 1648 as = as.double(as), 1649 Uijmat = as.double(Uijmat), 1650 d = as.integer(d), 1651 ncovs = as.integer(ncovs), 1652 nr = as.integer(dim(as)[1]), 1653 ns = as.integer(dim(as)[2]), 1654 m = as.integer(m), 1655 maxj = as.integer(max(Ji)), 1656 lik = as.double(loglik)) 1657 return(out$lik) 1658 }