iee {weightedCL} | 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 |
The |
ydat |
The |
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
References
Cameron, A. C. and Trivedi, P. K. (1998) Regression Analysis of Count Data. Cambridge: Cambridge University Press.
Examples
################################################################################
# NB2 regression for count time-series data
################################################################################
################################################################################
# read and set up data set
################################################################################
data(polio)
ydat <-polio
d=length(ydat)
tvec=1:length(ydat)
tvec1=tvec-73
xdat <- cbind(1, tvec1/1000, cos(2 * pi * tvec1 / 12), sin(2 * pi * tvec1 / 12),
cos(2 * pi * tvec1 / 6), sin(2 * pi * tvec1 / 6))
################################################################################
# select the marginal model
################################################################################
margmodel="nb2"
i.est<-iee(xdat,ydat,margmodel)
cat("\niest: IEE estimates\n")
print(c(i.est$reg,i.est$gam))