a <- model.frame(cbind(ncases,ncontrols) ~ agegp + tobgp + alcgp, data = esoph)
model.extract(a, "response")
stopifnot(model.extract(a, "response") == model.response(a))
a <- model.frame(ncases/(ncases+ncontrols) ~ agegp + tobgp + alcgp,
data = esoph, weights = ncases+ncontrols)
model.response(a)
model.extract(a, "weights")
a <- model.frame(cbind(ncases,ncontrols) ~ agegp,
something = tobgp, data = esoph)
names(a)
stopifnot(model.extract(a, "something") == esoph$tobgp)
Run the code above in your browser using DataLab