SEM.variance {coarseDataTools} | R Documentation |
This function is meant to be run only through the function EMforCFR() and is used to calculate the variance via the Supplemented EM algorithm (see Meng and Rubin, 1991)
SEM.variance(full.data, dat, phi, max.iter, tol, nlag, alpha.start.values, assumed.nu)
full.data |
A matrix of observed data. See description in EMforCFR helpfile. |
dat |
A data frame. |
phi |
A vector of fitted parameters from the final EM iteration. |
max.iter |
The maximum number of iterations for SEM algorithm. |
tol |
A tolerance to use to test for convergence of the EM algorithm. |
nlag |
The number of time units for lagged data. Corresponds to length(assumed.nu). |
alpha.start.values |
a vector starting values for the reporting rate parameter of the GLM model. This must have length which corresponds to one less than the number of unique integer values of full.dat[,"new.times"]. |
assumed.nu |
a vector of probabilities corresponding to the survival distribution, i.e. nu[i]=Pr(surviving i days | fatal case) |
A list with the following components
DM |
The estimate of the variance-covariance matrix for the model parameters. Only converged rows are returned. |
DMiter |
A vector whose ith entry is the number of iterations needed for convergence of the ith row of the DM matrix. |
loop.idx |
If not NULL, the values correspond to the original indices of DM which have been omitted because of lack of convergence. |
Nicholas G. Reich
Meng, X.L. and Rubin, D.B. JASA. 1991: 86 (416), 899-909.