R/lrtsccs.R

Defines functions lrtsccs

Documented in lrtsccs

lrtsccs<-function(model1,model2){
  test<-as.numeric((model1$logtest[1]-model2$logtest[1]))
  test<-signif(ifelse(test>0,test,-test), 4)
  df<-as.numeric(model1$logtest[2]-model2$logtest[2])
  df<-ifelse(df>0,df,-df)
  pvalue<-signif(pchisq(test,df,lower.tail=F), 4)
 # print(data.frame(test, df, pvalue), row.names=F)
 yy <- data.frame(test, df, pvalue)
 row.names(yy) <- " "
 return(yy)
}

Try the SCCS package in your browser

Any scripts or data that you put into this service are public.

SCCS documentation built on July 5, 2022, 5:05 p.m.