Learn R Programming

ggm (version 2.2)

fitmlogit: Multivariate logistic models

Description

Fits a logistic regression model to multivariate binary responses.

Usage

fitmlogit(..., C = c(), D = c(), data, mit = 100, ep = 1e-80, acc = 1e-04)

Arguments

...
Model formulae of marginal logistic models for each response and for each association parameters (log-odds ratios).
C
Matrix of equality constraints.
D
Matrix of inequality cosntraints.
data
A data frame containing the responses and the explanatory variables.
mit
A positive integer: maximum number of iterations. Default: 100.
ep
A tolerance used in the algorithm: default 1e-80.
acc
A tolerance used in the algorithm: default 1e-4.

Value

  • LLThe maximized log-likelihood.
  • beThe vector of the Maximum likelihood estimates of the parameters.
  • SThe estimated asymptotic covariance matrix.
  • PThe estimated cell probabilities for each individual.

Details

See Evans and Forcina (2011).

References

Evans, R.J. and Forcina, A. (2011). Two algorithms for fitting constrained marginal models. Submitted, arXiv:1110.2894v1 [stat.CO].

See Also

glm

Examples

Run this code
data(surdata)                     
out1 <- fitmlogit(A ~X, B ~ Z, cbind(A, B) ~ X*Z, data = surdata)     
out1$beta
out2 <- fitmlogit(A ~X, B ~ Z, cbind(A, B) ~ 1, data = surdata)        
out2$beta

Run the code above in your browser using DataLab