cglm: Estimates the ratio of the regression coefficients and the...

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/sourcecode.R

Description

cglm estimates the ratio of the regression coefficients and the dispersion parameter in conditional generalized linear models. This is of particular interest in the so-called case-time-control design.

Usage

1
cglm(method, formula, data, id, link, ...)

Arguments

method

a string specifying the desired estimation method; either "ts" for two-step estimation, or "cml" for conditional maximum likelihood estimation.

formula

a symbolic description of the model to be fitted.

data

a data frame containing the variables in the model.

id

a string containing the name of the cluster identification variable.

link

a string specifying the desired link function. This argument is not used when method="cml".

...

optional arguments passed on to the nleqslv function or the optim function, which are used to solve the estimating equations when method="ts" and method="cml", respectively. See the help pages for nleqslv and optim.

Details

Let y_{ij} and x_{ij} be the outcome and covariate(s) for subject j in cluster i, respectively. Consider the conditional generalized linear model

p(y_{ij}|i,x_{ij})=\textrm{exp}≤ft[\frac{θ_{ij}y_{ij}-A(θ_{ij})}{φ}+k(y_{ij},φ)\right]

where

θ_{ij}=η\{E(y_{ij}|x_{ij})\}=b_i+β x_{ij}.

cglm estimates the ratio

β / φ.

This ratio is of particular interest in so-called case-time-control designs; see Sjolander (2016) and Sjolander and Ning (2018) for details. Two estimation methods are allowed; the two-step method proposed by Sjolander (2016) and the conditional maximum likelihood method proposed by Sjolander and Ning (2018).

Value

An object of class "cglm" is a list containing

call

the matched call.

coefficients

the ratio of the estimated coefficients and the estimated dispersion parameter.

var

the variance-covariance matrix.

convergence

was a solution found to the estimating equations?

Note

Missing data are not allowed.

Author(s)

Arvid Sjolander.

References

Sjolander A. (2017). The case-time-control method for non-binary exposures. Sociological Methodology 47(1), 182-211.

Sjolander A., Ning Y. (2018). A general and robust estimation method for the case-time-control design. Sociological Methodology 49(1), 349-365.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(teenpov)

fit.ide <- cglm(method="ts", formula=hours~nonpov+inschool+spouse+age+mother, 
  data=teenpov, id="ID", link="identity")
summary(fit.ide)

fit.log <- cglm(method="ts", formula=hours~nonpov+inschool+spouse+age+mother, 
  data=teenpov, id="ID", link="log")
summary(fit.log)

fit.cglm <- cglm(method="cml", formula=hours~nonpov+inschool+spouse+age+mother,
  data=teenpov, id="ID")
summary(fit.cglm)

cglm documentation built on Dec. 10, 2019, 5:12 p.m.

Related to cglm in cglm...