validMCBinom_EC: Generalized Method of Moments Valid Moment Combinations for...

Description Usage Arguments Examples

Description

This function calculates the values of the valid moment conditions for a single subject in a longitudinal study with count (0-n) outcomes. It is assumed that the count represents the number of events from n identical trials, and that n is equal for all subjects and times. This is modeled similarly to a Logistic Regression for Binomial responses. It allows for unbalanced data, and uses the extended classification method to determine validity of moment conditions. The function returns a vector of valid moment condition values for subject i, along with an updated count vector of the number of valid moment conditions.

Usage

1
validMCBinom_EC(ymat, subjectIndex, Zmat, Xmat, betaI, T, Tmax, Count, types)

Arguments

ymat

The matrix of responses, ordered by subject, time within subject. The first column is the number of successes, the second the number of failures.

subjectIndex

The location of the first index of subject i responses within ymat.

Zmat

The design matrix for time-independent covariates.

Xmat

The design matrix for time-dependent covariates.

betaI

The current or initial estimates of the model parameters.

T

The number of time points for subject i.

Tmax

The maximum number of times of observation among all subjects.

Count

A vector of running counts of the number of valid moment conditions for all subjects.

types

A matrix indicating valid moment conditions for all time-dependent covariate parameters.

Examples

1

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