> logLik.test function(fit0,fit) { l0 = logLik(fit0) l1 = logLik(fit) lratio = abs(as.numeric(l0)-as.numeric(l1)) df = abs( attr(l1,'df') - attr(l0,'df') ) pval = 1-pchisq( 2*lratio, df) return(pval) }
Post a Comment
No comments:
Post a Comment