Learn R Programming

cquad (version 1.3)

cquad_basic: Conditional maximum likelihood estimation of the basic quadratic exponential model

Description

Fit by conditional maximum likelihood a simplified version of the model for binary logitudinal data proposed by Bartolucci & Nigro (2010); see also Cox (1972).

Usage

cquad_basic(id, yv, X = NULL, be = NULL, w = rep(1, n), dyn = FALSE)

Arguments

id

list of the reference unit of each observation

yv

corresponding vector of response variables

X

corresponding matrix of covariates (optional)

be

intial vector of parameters (optional)

w

vector of weights (optional)

dyn

TRUE if in the dynamic version; FALSE for the static version (by default)

Value

formula

formula defining the model

lk

conditional log-likelihood value

coefficients

estimate of the regression parameters (including for the lag-response)

vcov

asymptotic variance-covariance matrix for the parameter estimates

scv

matrix of individual scores

J

Hessian of the log-likelihood function

se

standard errors

ser

robust standard errors

Tv

number of time occasions for each unit

References

Bartolucci, F. and Nigro, V. (2010), A dynamic model for binary panel data with unobserved heterogeneity admitting a root-n consistent conditional estimator, Econometrica, 78, pp. 719-733.

Cox, D. R. (1972), The Analysis of multivariate binary data, Applied Statistics, 21, 113-120.

Examples

Run this code
# example based on simulated data
data(data_sim)
data_sim = data_sim[1:500,]   # to speed up the example, remove otherwise
id = data_sim$id; yv = data_sim$y; X = cbind(X1=data_sim$X1,X2=data_sim$X2)
# static model
out1 = cquad_basic(id,yv,X)
summary(out1)
# dynamic model
out2 = cquad_basic(id,yv,X,dyn=TRUE)
summary(out2)

Run the code above in your browser using DataLab