logFFT.patients: Log likelihood for BSD process with covariates

Description Usage Arguments Details Value

View source: R/bsd_package.R

Description

logFFT.patients evaluates the log likelihood of a dataset with observations corresponding to "patients" in the setting where rates of the process depend on patient-specific covariates. The transition probabilities given the states of the process at endpoints of each observation interval are computed using the FFT/generating function method, relying on getTrans.initList. The log likelihood is then the sum of these log transition probabilities.

Usage

1
2
  logFFT.patients(betas, t.pat, num.patients, PATIENTDATA,
    patients.design, s1.seq, s2.seq)

Arguments

betas

A vector of numbers \mathbfβ = (\mathbfβ^λ, \mathbfβ^ν, \mathbfβ^μ)

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

Details

Note: this function is used so that MLE estimation of the coefficient vector can be accomplished, i.e. using optim, and is also used in numerically computing standard errors at the MLE.

Vectors s1.seq and s2.seq should be of length greater than the total number of particles of either type at any observation interval

Value

The negative log likelihood of the observations in PATIENTDATA, given rates determined by coefficient vector betas and covariate values in patients.design


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