Last chance! 50% off unlimited learning
Sale ends in
seq2binomial(lprob1 = "logit", lprob2 = "logit", eprob1 = list(),
eprob2 = list(), iprob1 = NULL, iprob2 = NULL, zero = NULL)
Links
for more choices.earg
in Links
for general information.NULL
means a value is obtained in the initialize
slot.NULL
value mean"vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
and vgam
.prob1
,
$q$ is prob2
.Although the Authors refer to this as the bivariate binomial model, I have named it the (two-stage) sequential binomial model. Fisher scoring is used.
binomialff
.mvector = round(rnorm(n <- 100, m=10, sd=2))
x = runif(n)
prob1 = logit(+2-x, inverse=TRUE)
prob2 = logit(-2+x, inverse=TRUE)
successes1 = rbinom(n=n, size=mvector, prob=prob1)
successes2 = rbinom(n=n, size=successes1, prob=prob2)
y1 = successes1 / mvector
y2 = successes2 / successes1
fit = vglm(cbind(y1,y2) ~ x, seq2binomial, trace=TRUE, weight=mvector)
coef(fit)
coef(fit, mat=TRUE)
head(fitted(fit))
Run the code above in your browser using DataLab