# modular: Modular Functions for Joint Mean Correlation Model Fits In jmdl: Joint Mean-Correlation Regression Approach for Discrete Longitudinal Data

## Description

Modular Functions for joint mean correlation model fits

## Usage

 ```1 2 3 4 5 6``` ```ldFormula(formula, data = NULL, q = 2, theta = NULL, W.appendix = NULL, offset = NULL, family = c("Bernoulli", "Nbinom", "Poisson")) OptimizeJmdl(m, Y, X, W, time, offset = NULL, theta = NULL, family) JmdlMod(opt, args, std, tval, p, q, family, offset, mc) ```

## Arguments

 `formula` a two-sided linear formula object describing the covariates for both the mean and correlation matrix part of the model, with the response, the corresponding subject id and measurement time on the left of a operator~, divided by vertical bars ("|"). `data` a data frame containing the variables named in formula. `q` degree of polynomial of the time lag to model the lower triangular matrix. `theta` starting values for the parameters in the model. `W.appendix` appendix array to model time-dependent covariates for the lower triangular matrix. `offset` a term to be added to a linear predictor. `family` the marginal distributions of the discrete variables. choose 'Bernoulli', 'Poisson' or 'Nbinom'. `m` an integer vector of number of measurements for each subject. `Y` a matrix of responses for all subjects. `X` model matrix for mean structure model. `W` model array for the lower triangular matrix. `time` a vector of time from the data. `opt` optimized results returned by OptimizJmdl. `args` arguments returned by ldFormula. `std` standard error for parameters. `tval` t statistic. `p` p.value. `mc` matched call from the calling function.

jmdl documentation built on May 2, 2019, 11:04 a.m.