data(sex2)
fit<-logistf(data=sex2, case~age+oc+dia+vic+vicl+vis)
#simultaneous test of variables vic, vicl, vis:
anova(fit, formula=~vic+vicl+vis)
#test versus a simpler model
fit2<-logistf(data=sex2, case~age+oc+dia)
# or: fit2<-update(fit, case~age+oc+dia)
anova(fit,fit2)
# comparison of non-nested models (with different df):
fit3<-logistf(data=sex2, case~age+vic+vicl+vis)
anova(fit2,fit3, method="PLR")
Run the code above in your browser using DataLab