fast_Estep {frailtyEM} | R Documentation |
Fast fitting of the E step
Description
This function calculates the E step in a quicker way, without taking all the derivatives of the Laplace transform.
Such closed form solutions are only available for the gamma distribution (with or without left truncation) and
for the inverse Gaussian distribution (without left truncation).
For a data set with K
clusters,
Usage
fast_Estep(c, c_lt = 0, delta, alpha, bbeta, pvfm, dist)
Arguments
c |
Vector of length |
c_lt |
Vector of length |
delta |
Vector of integers of length |
alpha , bbeta |
Parameters of the frailty distribution |
pvfm |
Parameter for the PVF distribution, only matters in that case |
dist |
One of 0 (for gamma), 1 (for stable) or 2 (for PVF) |
Value
A K x 4
matrix where the first column and the second column are the numerators
and the denominators of the frailty fraction, the third is the log-likelihood contribution, and the
last column is the expectation of the squared frailty (only used in calculating the information matrix)