iee {weightedScores}R Documentation

INDEPENDENT ESTIMATING EQUATIONS FOR BINARY AND COUNT REGRESSION

Description

Independent estimating equations for binary and count regression.

Usage

iee(xdat,ydat,margmodel,link) 

Arguments

xdat

(x1,x2,,xn)(\mathbf{x}_1 , \mathbf{x}_2 , \ldots , \mathbf{x}_n )^\top, where the matrix xi,i=1,,n\mathbf{x}_i,\,i=1,\ldots,n for a given unit will depend on the times of observation for that unit (jij_i) and will have number of rows jij_i, each row corresponding to one of the jij_i elements of yiy_i and pp columns where pp is the number of covariates including the unit first column to account for the intercept. This xdat matrix is of dimension (N×p),(N\times p), where N=i=1njiN =\sum_{i=1}^n j_i is the total number of observations from all units.

ydat

(y1,y2,,yn)(y_1 , y_2 , \ldots , y_n )^\top, where the response data vectors yi,i=1,,ny_i,\,i=1,\ldots,n are of possibly different lengths for different units. In particular, we now have that yiy_i is (ji×1j_i \times 1), where jij_i is the number of observations on unit ii. The total number of observations from all units is N=i=1njiN =\sum_{i=1}^n j_i. The ydat are the collection of data vectors yi,i=1,,ny_i, i = 1,\ldots,n one from each unit which summarize all the data together in a single, long vector of length NN.

margmodel

Indicates the marginal model. Choices are “poisson” for Poisson, “bernoulli” for Bernoulli, and “nb1” , “nb2” for the NB1 and NB2 parametrization of negative binomial in Cameron and Trivedi (1998).

link

The link function. Choices are “log” for the log link function, “logit” for the logit link function, and “probit” for the probit link function.

Details

The univariate parameters are estimated from the sum of univariate marginal log-likelihoods.

Value

A list containing the following components:

coef

The vector with the estimated regression parameters.

gam

The vector with the estimated parameters that are not regression parameters. This is NULL for Poisson and binary regression.

Author(s)

Aristidis K. Nikoloulopoulos A.Nikoloulopoulos@uea.ac.uk
Harry Joe harry.joe@ubc.ca

References

Cameron, A. C. and Trivedi, P. K. (1998) Regression Analysis of Count Data. Cambridge: Cambridge University Press.

See Also

marglik

Examples


################################################################################
#                      read and set up data set
################################################################################
data(toenail)
# covariates
xdat<-cbind(1,toenail$treat,toenail$time,toenail$treat*toenail$time)
# response
ydat<-toenail$y
#id
id<-toenail$id
#time
tvec<-toenail$time
################################################################################
#                      select the marginal model
################################################################################
margmodel="bernoulli"
################################################################################
#                      perform the IEE method
################################################################################
i.est<-iee(xdat,ydat,margmodel)
cat("\niest: IEE estimates\n")
print(c(i.est$reg,i.est$gam))

[Package weightedScores version 0.9.5.3 Index]