marglik: NEGATIVE LOG-LIKELIHOOD ASSUMING INDEPEDENCE WITHIN CLUSTERS

Description Usage Arguments Details Value Author(s) References See Also

View source: R/wtsc-all.r

Description

Negative log-likelihood assuming independence within clusters.

Usage

1
marglik(param,xdat,ydat,margmodel,link)

Arguments

param

The vector of regression and not regression parameters.

xdat

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

ydat

(y_1 , y_2 , … , y_n )^\top, where the response data vectors y_i,\,i=1,…,n are of possibly different lengths for different units. In particular, we now have that y_i is (j_i \times 1), where j_i is the number of observations on unit i. The total number of observations from all units is N =∑_{i=1}^n j_i. The ydat are the collection of data vectors y_i, i = 1,…,n one from each unit which summarize all the data together in a single, long vector of length N.

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 negative sum of univariate marginal log-likelihoods.

Value

Minus log-likelihood assuming independence.

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

iee


weightedScores documentation built on March 24, 2020, 1:07 a.m.