Description Usage Arguments Value Examples
This function returns a matrix containing the birth, shift, and death rates of each patient. The rates are calculated based on the log-linear relationship between regression coefficients \mathbf{β} = (\mathbf{β^λ}, \mathbf{β}^ν, \mathbf{β}^μ) and covariates \mathbf{z_p} in the pth column of the design matrix given by \log(λ_p) = \mathbfβ^λ \cdot \mathbf{z_p}, \log(ν_p) = \mathbfβ^ν \cdot \mathbf{z_p}, \log(μ_p) = \mathbfβ^μ \cdot \mathbf{z_p}
1 | MakePatientRates(patients.design, betaVec)
|
patients.design |
A n \times m matrix, where n is number of covariates (including intercept) in the model and m is number of patients |
betaVec |
The vector \mathbfβ of regression coefficients. Note this function assumes that \mathbfβ^λ, \mathbfβ^ν, \mathbfβ^μ are equal in length. That is, each rate depends on the same number of covariates |
A 3 \times m matrix where m is the number of patients, and rows correspond to birth, shift, and death rates respectively.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.