EM.run: Inference via EM algorithm

Description Usage Arguments Details Value

View source: R/bsd_package.R

Description

This function runs the EM algorithm from an initial guess. Infers the coefficient vector in setting where rates depend on patient-specific covariates. The EM algorithm alternates between calling ESTEP and MSTEP until the change in observed log-likelihood changes less than a specified relative tolerance between iterations

Usage

1
2
  EM.run(betaInit, t.pat, num.patients, PATIENTDATA,
    patients.design, s1.seq, s2.seq, relTol)

Arguments

betaInit

A vector, the initial guess for coefficients beta

t.pat

A number, the observation interval length

num.patients

An integer, number of unique patients

PATIENTDATA

A matrix in the form returned by MakePatientData containing the set of observation intervals

patients.design

A design matrix in the same form as returned by PatientDesignExample

s1.seq

A vector of complex arguments evenly spaced along the unit circle

s2.seq

A vector of complex arguments evenly spaced along the unit circle

relTol

A number, the relative convergence criterion

Details

Examples are not included here due to runtime, but see vignette for usage.

Value

A list containing the log-likelihood value at convergence, the final beta estimate, and the number of iterations


jasonxu90/bdsem documentation built on May 18, 2019, 5:54 p.m.