powered by
biv.binom fits (logit) linear regression models to a marginal bivariate binomial distribution. The covariates must be of length K, that is the number of 2x2 tables.
biv.binom
biv.binom( freq, marg1 = ~1, marg2 = ~1, interaction = ~1, pmarg1 = 1, pmarg2 = 1, pinteraction = 1, print.level = 0, typsize = abs(p), ndigit = 10, gradtol = 1e-05, stepmax = 10 * sqrt(p %*% p), steptol = 1e-05, iterlim = 100, fscale = 1 )
A list of class bivbinom is returned.
bivbinom
A four-column matrix containing K 2x2 frequency tables.
The model formula for the first margin.
The model formula for the second margin.
The model formula for the interaction.
Initial parameter estimates for the first margin regression.
Initial parameter estimates for the second margin regression.
Initial parameter estimates for the interaction regression.
Arguments for nlm.
J.K. Lindsey
# 5 2x2 tables Freq <- matrix(rpois(20,10),ncol=4) x <- c(6,8,10,12,14) print(z <- biv.binom(Freq,marg1=~x,marg2=~x,inter=~x,pmarg1=c(-2,0.08), pmarg2=c(-2,0.1),pinter=c(3,0)))
Run the code above in your browser using DataLab