TSGMM: Two-Step Generalized Method of Moments, Longitudinal Outcome

Description Usage Arguments Examples

Description

This function calculates the Generalized Method of Moments (GMM) parameter estimates and standard errors for longitudinal data. The function allows for unbalanced data, meaning subjects can have different numbers of times of observation. Both time-independent covariates and time-dependent covariates can be accommodated. Time-dependent covariates can be handled either by specifying the type of each time-dependent covariate, or by allowing the data to determine appropriate moment conditions through the extended classification method. While the GMM estimation method does not require a data-generating process, and therefore response are not assumed to be distributed according to known distributions, data response types can loosely be associated with traditional response distributions. These include continuous outcomes (similar to Normal models), binary outcomes (similar to Bernoulli logistic models), proportions (similar to Beta regression), count events (similar to Binomial logistic models), counts (similar to Poisson regression), positive-counts (similar to Positive Poisson regression), hurdle outcomes (similar to Hurdle Poisson regression), and zero-inflated outomes (similar to Zero-Inflated Poisson models).

Usage

1
2
TSGMM(yvec, subjectID, Zmat, Xmat, Tvec, N, mc = "EC", covTypeVec = c(-1),
  response = "continuous")

Arguments

yvec

The vector of responses, ordered by subject, time within subject. If the response type is 'count-events' (similar to Binomial data) the response is assumed to be a matrix with two columns: the first column will be the count of successes (or events), and the second column will be the count of failures (or non-events).

subjectID

The vector of subject ID values for each response.

Zmat

The design matrix for time-independent covariates.

Xmat

The design matrix for time-dependent covariates.

Tvec

The vector of times for each subject.

N

The number of subjects.

mc

The method of identifying appropriate moment conditions, either 'EC' for extended classification (default) or 'Types' for user-identified types.

covTypeVec

The vector indicating the type of each time-dependent covariate, according to the order of the columns of Xmat.

response

The response type, either 'continuous', 'binary', 'proportion', 'count-events', 'count', 'positive-count', 'hurdle', or 'zi'.

Examples

1

lalondetl/GMM documentation built on May 30, 2019, 11:40 p.m.